Ronan

847 Reputation

14 Badges

11 years, 275 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are replies submitted by Ronan

@Mac Dude Ok. Have downloaded it. Will work on it over the next week. Sure I'll have a few questions.

restart;



MyTypes := {algebraic, ''[algebraic$_], 'Vector(_, algebraic)'''$_ = 2 .. 3};

TypeTools:-AddType(MyType, MyTypes);

MyProc := proc (Q1::(depends(And(MyType, satisfies(proc (Q1) options operator, arrow; andmap(proc (T) options operator, arrow; Q1::T implies Q2::T and Q3::T end proc, MyTypes) end proc)))), Q2, Q3) if Q1::algebraic then print('algebraic*inputs') elif Q1::[algebraic$2] then print('List*inputs', 2, 'elements') elif Q1::[algebraic$3] then print('List*inputs', 3, 'elements') elif Q1::'Vector(2, algebraic)' then print('vector', 2) else Q1::'Vector(3, algebraic)'; print('vector', 3) end if end proc;
MyProc(sqrt(1-2*x), 2*x, 3);
                        algebraic inputs
MyProc([1, x], [2, 3], [1, sqrt(1-2*x)]);
                    List inputs, 2, elements
MyProc([1, x, 1], [2, 3, 2], [1, sqrt(1-2*x), 2]);
                    List inputs, 3, elements
MyProc(`<,>`(1, 1), `<,>`(2, 3), `<,>`(1, 2));
                           vector, 2
MyProc(`<,>`(1, 2), `<,>`(2, 3), `<,>`(1, 2));
                  proc(n, f, t)  ...  end;, 2
MyProc(`<,>`(1, 2, 3), `<,>`(2, 3, 6), `<,>`(1, -5, 2));
                  proc(n, f, t)  ...  end;, 3
MyProc(`<,>`(1, x, 1), `<,>`(2, 3, 3), `<,>`(1, 2, 7));
                  proc(n, f, t)  ...  end;, 3
MyProc(sqrt(1-2*x), 2, [3, 1]);
Error, invalid input: MyProc expects its 1st argument, Q1, to be of type And(MyType, satisfies(proc (Q1) options operator, arrow; andmap(proc (T) options operator, arrow; Q1::T implies Q2::T and Q3::T end proc, MyTypes) end proc)), but received (1-2*x)^(1/2)
MyProc([1, `<,>`(2)], [sqrt(1-2*x), 3], [1, 2]);
Error, invalid input: MyProc expects its 1st argument, Q1, to be of type And(MyType, satisfies(proc (Q1) options operator, arrow; andmap(proc (T) options operator, arrow; Q1::T implies Q2::T and Q3::T end proc, MyTypes) end proc)), but received [1, Vector(1, {(1) = 2})]



@Carl Love I have made some progress with understanding this. I can see how it works. It does seem to have a problem with Vectors. Get this as an output.

proc(n, f, t)  ...  end;, 2
 Sometimes it works with  vectors.

I want to put this set of "types" into Packege. Obiviously the most efficient thing is the types get defined globally at the start of the package and then can be used as needed in individual procedures in the package. I tried placing part of your 1st answer into the package.

uses TT= TypeTools;
global _T1, _T2L, _T2V, _T3L, _T3V, _MyType;
local
     MyTypes:= {_T1, _T2L, _T2V, _T3L, _T3V},
     AllMyTypes:= MyTypes union {_MyType},

     ModuleLoad:= proc()
     local
          g, #iterator over module globals
          e
     ;
          #op([2,6], ...) of a module is its globals.
          for g in op([2,6], thismodule) do
               e:= eval(g);
               if g <> e and e in AllMyTypes then
                    error "The name %1 must be globally available.", g
               end if
          end do;
          TT:-AddType(_T1, algebraic);
          TT:-AddType(_T2V, 'Vector(2, algebraic)');
          TT:-AddType(_T2L, [algebraic $ 2]);
          TT:-AddType(_T3V, 'Vector(3, algebraic)');
          TT:-AddType(_T3L, [algebraic $ 3]);
          TT:-AddType(_MyType, MyTypes)
     end proc,

That didn't work. I don't know how much of it I need. Do I need to use all of the module on procedures that check input types

You 1st answer works fine with the tested inputs on the vectors. I found if I only enter 2 parameters it crashes Maple, looses kernel connection.

This leads to another question. Can a procedure have a variable number of imputs? Outside of putting them in a list first. An axample here would be angle formed be 3 points or 2 vectors or 2 lines.

 Could an input be allowed to be Null? Or C takes on a default value is not entered.

Just to note here. Only some of the procedures in the package need to test the input parameters and usually not all types would need to be tested.

 

 

 

Good basic overhaul on the look for the forum. Others have suggested improvements on this so don't need to recover that ground.

Have been experiencing some problems.

Some times when I hit return I loose my reply or it jumps to the end of the discussion i.e off the reply window. I am having problems posting a worksheet, nothing happens. The insert contents button seems frozen. How do you insret code (like the way Car Love and others do)? I tried copy and paste but it looked a mess.

@Joe Riel That works well and is simple to impliment. One thing I dont understand, how does the test produce an error on mixed input types. It only appears to test the 1st eleme A but on mixed input types produces the error as required. Haven't tested for vectors yet.

 

@Mac Dude  Thank you.  Got it to work. I manually made a folder on the C drive "libR". Then ran the work sheet. That created the help file and added the 2 document. Great. I Underatand to edit the help contents delete the .help file and after modyfing the worksheets run the "help edit to databse" again. All good so far.

 

One more question on this.

This first worksheet added opens in the browser when searched for. The second one opens as a worksheet in Maple.

Any Idea why?

 Edit:- I fixed the problem additional help files not opening in the browser. This is what the document properties "Active"= true opens the help as the maple worksheet, false opens the help in the browser.

I have not tried moving the  .help file to where the .mla file is yet. Is that important?

 

NULL

NULL

currentdir();

"C:\Users\Ronan.Ronan-PC\Documents\MAPLE\Rational Trinonometry"

(1)

 

``

HelpTools[Database][Create]("C:/libR/RatTrig.help");

"C:/libR/RatTrig.help"

(2)

HelpTools[Database][Add]("C:/libR/RatTrig.help");

["C:\Program Files\Maple 2016\lib\maple.help", "C:\Program Files\Maple 2016\lib\update.help"]

(3)

HelpTools[Database][GetActive]();

["C:/libR/RatTrig.help", "C:\Program Files\Maple 2016\lib\maple.help", "C:\Program Files\Maple 2016\lib\update.help"]

(4)

``

makehelp("RationalTrigonometry", "Rational Trigonometry Overiew Help.mw", "C:/libR/RatTrig.help", browser = ["Rational Trigonometry", "Overview"]);

["C:/libR/RatTrig.help", "C:\Program Files\Maple 2016\lib\maple.help", "C:\Program Files\Maple 2016\lib\update.help"]

(5)

makehelp("RationalTrigonometry,Quadrance", "Help Quadrance.mw", "C:/libR/RatTrig.help", browser = ["RationalTrigonometry", "Quadrance"]);

``

NULL

 

Download help_edit_to_Database.mw

 

help_edit_to_Database.mw    @Mac Dude Thank you that is a helpful concept. See your worksheet was created in Maple2015. I have edited your

worksheet. Cant seem to get it to work. Found what your mentioned on setting active to false. Didnt make afifference. I have uploaded 2 files your's edited and the one I used to make the database path. Wonder if there is a syntax change between 2015 and 2016?

 


restart

currentdir();

"C:\Users\Ronan.Ronan-PC\Documents\MAPLE\Rational Trinonometry"

(1)

 

HelpTools[Database][GetActive]();

["C:\Program Files\Maple 2016\lib\maple.help", "C:\Program Files\Maple 2016\lib\update.help", "C:\Users\Ronan.Ronan-PC\maple\toolbox\UserHelp\lib\maple.help"]

(2)

NULL

makehelp("Rational Trigonometry", "Rational Trigonometry Overiew Help.mw", "C:\Users\Ronan.Ronan-PC\maple\toolbox\UserHelp\lib\maple.help", browser = ["Rational Trigonometry", "Overview"])

Error, (in HelpTools:-HelpCallUI) help database 'C:\Users\Ronan.Ronan-PC\Documents\MAPLE\Rational Trinonometry\C:UsersRonan.Ronan-PCmaple        oolboxUserHelplibmaple.help' already exists

 

["C:\Program Files\Maple 2016\lib\maple.help", "C:\Program Files\Maple 2016\lib\update.help", "C:\Users\Ronan.Ronan-PC\maple\toolbox\UserHelp\lib\maple.help"]

(3)

["C:\Program Files\Maple 2016\lib\maple.help", "C:\Program Files\Maple 2016\lib\update.help", "C:\Users\Ronan.Ronan-PC\maple\toolbox\UserHelp\lib\maple.help"]

(4)

NULL


Download help_edit_to_Database.mw

@Mac Dude 


@John Fredsted  Thank you for your help. This worked.

restart

mylibdir := cat(kernelopts(homedir), kernelopts(dirsep), "maple", kernelopts(dirsep), "toolbox", kernelopts(dirsep), "personal", kernelopts(dirsep), "lib")

"C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib"

(1)

NULL

libname := mylibdir, libname

"C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib", "C:\Program Files\Maple 2016\lib", "C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib"

(2)

RTest := module () export Point2, Point3, LinePts, Line, LinePrll, LinePrpnd, Linepts, Quadrance; option package;  Point2 := proc (x1, y1) options operator, arrow; [x1, y1] end proc; Point3 := proc (x1, y1, z1) options operator, arrow; [x1, y1, z1] end proc; Linepts := proc (p1, p2) options operator, arrow; (p2[2]-p1[2])*x+(p1[1]-p2[1])*y-p2[2]*p1[1]+p1[2]*p2[1] end proc; Line := proc (a, b, c) options operator, arrow; a*x+b*y+c end proc; LinePrll := proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, y)-coeff(l2, x)*coeff(l1, y) = 0) end proc; LinePrpnd := proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, x)+coeff(l1, y)*coeff(l2, y) = 0) end proc; Quadrance := proc (a1, a2) options operator, arrow; (a1[1]-a2[1])^2+(a1[2]-a2[2])^2 end proc end module

_m643596096

(3)

``

NULL

savelib('RTest')

restart

with(RTest)

[Line, LinePrll, LinePrpnd, LinePts, Linepts, Point2, Point3, Quadrance]

(4)

NULL


Download Library_Creation1.mw

 

 

@John Fredsted 

Sorry to be a pain on this. Now it procudes Error cannot open C:\........\lib, for writing.

Any ideas what would cause this. Using Maple 2016.

in Mable 2016 libname gives  "C:\Program Files\Maple 2016\lib"

Interesting it works in Maple 18

in Maple 18 libname gives "C:\Program Files\Maple 18\lib"  ,  "." What is this "."

It Must be where RTest was stored because it is not showing up .....Maple 18\lib.

 


 Ok Thank you. That helps. I don't get the savelib part. I just cant make sense of the maple documentation.

restart

RTest := module () export Point2, Point3, LinePts, Line, LnPrll, LnPrpnd, Quadrance; option package;  Point2 := proc (x1, y1) options operator, arrow; [x1, y1] end proc; Point3 := proc (x1, y1, z1) options operator, arrow; [x1, y1, z1] end proc; Line := proc (a, b, c) options operator, arrow; a*x+b*y+c end proc; LnPrll := proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, y)-coeff(l2, x)*coeff(l1, y) = 0) end proc; LnPrpnd := proc (l1, l2) options operator, arrow; is(coeff(l1, x)*coeff(l2, x)+coeff(l1, y)*coeff(l2, y) = 0) end proc; Quadrance := proc (a1, a2) options operator, arrow; (a1[1]-a2[1])^2+(a1[2]-a2[2])^2 end proc end module

_m1047098624

(1)

the Library folder should be C:\Program Files\Maple 2016\lib

savelib(RTest.mla)

Error, invalid input: savelib expects its 1st argument, to be of type symbol, but received RTest . mla

 

``


Download test_Package.mw

@John Fredsted 

 

 

This may be of some assistence to you

 

https://www.youtube.com/user/MaplesoftVideo/videos?view=0

https://www.youtube.com/watch?v=AZDw3SJE_jE

And Peter Stones site

http://www.peterstone.name/Maplepgs/maple_index.html

 

http://www.mapleprimes.com/maplesoftblog/203933-A-New-Section-Style-With-Programmatic

This is 2nd in the list on the right of your screen.

 

@Carl Love I have the quite a few looks in help for this. Haven't found anything useful on it. It seems a very powerful tool. I could ask a list of questions on this but would rather do some basic study on it and see how I can apply it myself before asking questions.

 


 You probably can't solve this without assinging values to to constants. Convert the constants to rational numbers. I just made up random values for them. Then run Groebner basis using tdeg. Convert the Basis using the FGLM command to plex form. Gives 4 equations that can be solved in sequence.

Actually you can run Basis([Q1,Q2,Q3,Q4],plex(p1,p2,q1,q2)) and it gets you straight to the 4 equations.

I just picked this method because I was using Groebnr recently.

restart

(1)

``

``

with(Groebner)

[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, Homogenize, InitialForm, InterReduce, IsBasis, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MatrixOrder, MaximalIndependentSet, MonomialOrder, MultiplicationMatrix, MultivariateCyclicVector, NormalForm, NormalSet, RationalUnivariateRepresentation, Reduce, RememberBasis, SPolynomial, Solve, SuggestVariableOrder, Support, TestOrder, ToricIdealBasis, TrailingTerm, UnivariatePolynomial, Walk, WeightedDegree]

(2)

delta12 := 2; 1; gamma11 := 3; 1; s11 := 5; 1; s12 := 7; 1; F := 9; 1; mu1 := 2; -1; upsilon := 3; -1; delta1 := 2/3; 1; gamma12 := 3/2; 1; upsilon1 := 5/2; 1; gamma22 := 2; 1; gamma21 := 4; 1; mu2 := 3; 1; upsilon2 := 1/2; -1; delta2 := 1; 1; s21 := 5/3

5/3

(3)

Q1 := -mu1*p1-upsilon1*q1+gamma11*q1*(p1^2+q1^2)+gamma12*q1*(p2^2+q2^2)-delta1*(2*p1*q1*p2-q2*(p1^2-q1^2))-s11*F*q1+s12*F*q2

-2*p1-(95/2)*q1+3*q1*(p1^2+q1^2)+(3/2)*q1*(p2^2+q2^2)-(4/3)*p1*q1*p2+(2/3)*q2*(p1^2-q1^2)+63*q2

(4)

Q2 := -mu1*q1+upsilon1*p1-gamma11*p1*(p1^2+q1^2)-gamma12*p1*(p2^2+q2^2)-delta1*(2*p1*q1*q2+p2*(p1^2-q1^2))-s11*F*p1-s12*F*p2

-2*q1-(85/2)*p1-3*p1*(p1^2+q1^2)-(3/2)*p1*(p2^2+q2^2)-(4/3)*p1*q1*q2-(2/3)*p2*(p1^2-q1^2)-63*p2

(5)

Q3 := -mu2*p2-upsilon2*q2+gamma21*q2*(p1^2+q1^2)+gamma22*q2*(p2^2+q2^2)+delta2*(3*p1^2*q1-q1^3)+s21*F*q1

-3*p2-(1/2)*q2+4*q2*(p1^2+q1^2)+2*q2*(p2^2+q2^2)+3*p1^2*q1-q1^3+15*q1

(6)

Q4 := -mu2*q2+upsilon2*p2-gamma21*p2*(p1^2+q1^2)-gamma22*p2*(p2^2+q2^2)+delta2*(-p1^3+3*p1*q1^2)-s21*F*p1

-3*q2+(1/2)*p2-4*p2*(p1^2+q1^2)-2*p2*(p2^2+q2^2)-p1^3+3*q1^2*p1-15*p1

(7)

for i to 4 do Q || i := expand(Q || i) end do

-3*q2+(1/2)*p2-4*p1^2*p2-4*p2*q1^2-2*p2^3-2*p2*q2^2-p1^3+3*q1^2*p1-15*p1

(8)

``

``

``

GrB := Basis([Q1, Q2, Q3, Q4], tdeg(p1, p2, q1, q2)):

nops(GrB)

17

(9)

for i to nops(GrB) do i, indets(GrB[i]), GrB[i] end do

17, {p1, p2, q1, q2}, 592578269604476160594827614911477308162842405749109663347782390051923633004734174356430848*q2^5-8188889431536302140049751824134114906625554964566164162808109058039884470794985989956085253*p1*q2^2-24587233360022679803255608473895527568022923297141513181262174962649694644760668886897649567*p2*q1*q2+22786588476144950976672317740111064360367964454837626088933514396538117801522803510392374704*p2*q2^2+6438311734146197038829024314893026689264219187493417543118078385389241447385754107564452960*q1^2*q2-74150883012538497614206422982582748488283239434922347917088240024849446654045185759181533896*q1*q2^2+71929283757489671359324863077977284676436810037206875951623104916272397592262490703718196960*q2^3-21720093936910349498352115640826397108357333106684075471160032664468997417496322730988596*p1+137351033017067908196563406622928915908161196049004058575377798466548792647206274749712680*p2-905803076041354676839091395975885239909593554832874332384756219299565023992245509280524332*q1-39703025086530695609460658571362762190918220343050444181437599764040744395055532110554852*q2

(10)

GrB2 := FGLM(GrB, tdeg(p1, p2, q1, q2), plex(p1, p2, q1, q2))

[23529905144891662130957340897985972312689276274497286197156421123362404217913344*q2^21+5669277369278238894379366702557124216874783101828007958382041118101180795146207232*q2^19+517504442041772340209755304090945814442473670104605422413411434899841221982325755904*q2^17-1673141918698417015670758404051809076047854587269396795704583484619166852781991120512*q2^15-4148347321052562742073381069917678146910417168131195382866724142328209560540112016579*q2^13+13227196642107897504794138804070048094330201183615590373786672595173402713616857291921*q2^11-324761287574034180221762897002387964115887520233913996182546800548655312296974049568*q2^9+4026926275605470840464403894948857645082998125830684298577814951295355397119662939*q2^7-2883155636228620580609498678948186996140109625304971279509632275551613102169082*q2^5-4492195105642454327216937953173659821420804568151469887748650469670001549281*q2^3+1308107123169304843127495424319349686979253573360024371138702058001363337*q2, -18495251288260757861344781741648014476775101683984202117929009455111064670768473931126567232765673953873392585100077315914904994775083809335762048542236312836512137057426176168098294543369347490262874396091808959093124048414688771291094153182322745031464016209482353458034907400377339587661889233771361169048117210565053359337937049205623712903387727738904687414085887251134460652937072745047807449764808572531497172435037232893845898846502436819379176251952751585440744204902796912412417447369100911398799554430335398411306309632823588844652150632462043384887995614739479039047149863997208316787911129122647090116132931776693229123949547225088*q2^19-4456266304865066866522077621576181322538418522659162766345426723065130527360468502715490779920393473182290111142983363451196116958685978477385850215624036247778682210160682133267182671890048997060299047565421214107913626539830132017426835956927048716929827521881627820010553400309620100188372871756205407296881723535145292729106997196130360049943943745967410659318278000792246261503813454543683707986839067718167144189427000075857308384307742701627287428936036000472274979139539842236493918187650613034440276415280683238842913945527646004762436671682605287722665403198381300364763350052621725513107703000302929775953444338233471570245380187619328*q2^17-406783229160352346750990985480126279075320418621820284659003495844275173866954838992171281522239658065521190721987595558838842591467914380405730441306364622741914989898149190351274764642622475606529421822188493213088253913699516173744529511337296500023129996085657927139119421019203461306566894902276473393439581383726229526091257672770116013694385983737494786146837689205443763390909036343118202494645401410910903648465623604043434218841497453589685560339329077597462295875616931681891009103458558619583193169165383201943006143816126875394016435747848278434517603401457771793885737039941693049734451044865073082048722831871649624602156519298461696*q2^15+1314381828533233882884694369653494347797768185379331791631550606512505400580338647145788814571530587135389169004860265584524490107292789570503700558107989577590774359493497852229793681646252998048255317218714128739713780255797064412974123804295351657230161937816192881279982516931681996617841062567656661200938912351547860540573184020241183159036062668286925395553342024151948863949596694515988992657285356260053067042269349131746711830152609124950142789314542801353248457047050159127220398729896868502732962972887220320931896167649763723241483534087921001301344820396269434879674748106968775224771768608690505651067563894244447952050155769968311168*q2^13+3263190916010190122075950199983057956163906246860798097663729940936607223849143593569138063110471487104508235535004742670104287281504095091516863006213642869109626710922712245017336146336412078761799028742144808042731654888504032442524340133817570071779104731164781234477988437566657804579250733514102022541623891175455301161649746881051707200613009293678514488812324770803846486004838441930477722617895474284313176730938631505219221891553805377719669193009754017030565713979339490607890971750810986601028739114461248081471914541361074474649064022390868951881026566385365257503316439685181808875378046399406983027863532818071709001469295426214825929*q2^11-10390894045244315662951695098920934580231095943793902060721981695131181082105029079915741890389879830614730401122777092048822707212682397981835454262852614760682246985192469942318722596345822705827631324617030646257352144699714872837017977167735899866846477044371316021843614221177630653797220088727620588348333763785897524959315469331507366117835148453624531988622435022923202048157756144796680265739373187691869844831441406978340031712904221835833568005280772546455124399994443844386208274923770859726522227993670301695504405498657819577088103198746012359107776852969307512970019925230881832066596601167659652251145216435102434217869871513895367614*q2^9+235837434198626190420669581725727182177715502337260240893454552316507989590317015453586528008259928314736176059358916536995322613017907730452168505348338950307037459947235208701415451546071749732916118995724275324297952923731356439081836114499840123968224777980861726282998817172223465641461947688020069180444426026624024532693440282677900050138711783801353448893478289092813643919186174954074891593864619879122280077014466015117570282630468042487756228095507501329138413484468319557586234252938737986912186555717390906295984877194294990860727357988728197855284193974662226107158463405048897204507799360932805750421739689360823356566390658204099373*q2^7-2716604266112159814715977313149435248445221533300929632757455294792229585475881237140800985959871167825425884989104754887635441319108165554352693322368588645732077799833018530349225446432573260015926872557650618013277722715117214085887902537873585748026390890874768682205779369210091459578548994525860842933106923174405142550848535317885138081294027844622477957224840418664390631646564487601652879861380041327013696422024096785211589655843117589304492845526767767085850366535761917743709648986899895152394738096053126432423272936594284378527171754281867972489056551426232191339621689085289754838193747870216486879883644729919539307179992082398116*q2^5-2987470457714316820376663376261489678743674796281966813440673426996666055301317898056618872940587944788047446506863092227602832144057647424949306992244361191146037088415719336274416696020106849742762274051489806372168540924741087699155345603566761822998755460734941523384409172711487789324377342321114373564565303092187704897198236017536546454242971454258762616117931616141443506124753208726170388754709686067524747524785495267809528599802469419661638514099028613954579232147322670459069295420140340711846725027440851424049008764882278486247922491599187057450591620619995782760972377269232984220185683568508603997335201091552906375517585185961*q2^3+96013226779836323367617362523779424044530021376376253614734535770626736256613614483575818209764228904778736698348526559546539853023440551094123973625857422025638922639272143624845550502523648506865684575708702529595890383409292110659725675496245173856808896522971243459325590313248951175723487324199282198373017926330335426317167913880367518377544815722962252841333819822182092493407957908437444191477504989356104604927997683166456471090887539983076300945248318316496889605573385510987155918724973310732030274804668374175551492490253799804153928196584740458435058714257590435668283932177787794133403592633806370380268992664401397541665678*q1-126763189804835288313306953030178391118374054052450455263498891260251595589976269144884042811971736170230677004284352775371630110831079130875574534568147774235185574003377998210821036614878745707297805472918141788813818307597926664209278464984986254920968622215552040914339146243057720711948731410765741019021286164396149169343648101882220307665549516167287859756120370093827721688281372793318170840903677941630415530195808420788505606452149407975491810201557476131651460198564643502155526294421820639451813324895469043009903265467520896008587225452537682213127343133935862322675961350830051437258613727031620515823120648855677976157100776*q2, 116122036494064527780443542321897761698158544199793204954858534564368841522388931809440753493391455349764525979284786258698388296009538955020616449430755260682459169607351632952006555956308402614748921757252591998993704113616493680203054624233391953963304796244123905361941053666345995866277351913293442743317237661986855209435155265327072729162111428978533726055938052522865182841683401884685221468737457599297410566807188399656363150993565013267784007144681019862865898697620304565288695462036264167099143219671201108921358104350703349183874984861104039053765224502382548740042908992758423083869941979978354782914378185538758311186792078901248*q2^19+27978375008672539081496646262752802197441046453710024801751651696452680205382858898550169851424638698672438820563476320886259422097795665341365597881477927130800326405498812769884985959933138956626127940969306097156593471329684810675154603064565202693567500601255780480102416631062778021640336643391756052057750497065848512413914675206176856830913990226895368749670857483545998339026858607451873139815205765741996437279680615681873511128487835582282659510403659482093346706067003954387728549054198808453222909959465545981376932707972633047208204357438508463355078595670894090930023817136434209848610016051320886099489891706921114208569547133288448*q2^17+2553932288996530510761800900268632904312939874919701213036942357684780648177534674312911071728180338583343971507587802063237137031507160922019816077431674907606393389557489575223718799427340303643546372680945822324158136959008495275123224870305812408100159207112743856545548021500770265083035442363769835024918019962615391190866075492400970358423921345047524118188339493964875387508773469886571442477506116214903222434718285067546336848665087574951035490973175039686930312069612708880638074714569033937385712809142185614320265426023208734966955596765369480212595166986936639319135772648267190541421316280254177281833989906996584686678391514912735232*q2^15-8256649013814646658337060104783800426022156796759430468731646919195543712712576563511499806557644739594656943688351796161816356391186523710826228565978696656985393613669127975301539683809841649824477709263338827688324448425674163446063489220010972209289472828717488044314372832417930581159467108732587758177911224892096154012920046547060673634218062613418609456203054263525871338611329850489590537171951978533787221100869518732279227900717613726291665660539147808428848182358514868393720149445763942297466247867242832214724111377525108592674460472465718921620812764963143862891213566418208913178617711089756776902736775318314045208270271308674677248*q2^13-20473882003273914869773834712838407999355035440561349187891741969332648612707862450007602024843187699395995662098172512316449783627842055823438607381796400273937900604362886245633923895765131769267476823169561117254267343041233643936276250873653940470538172400928275072290612390017739890600072984799759121194697516613534938557029022725766979134373678255333904891309073594229760958734005457030561339834925767346770870301268740051137490080816773973993137633321094008923742583915527289949615988645211370864594725382024928980418801219697268249444809463456194752480515437670626976557273478561430100882655436946893517869091956975207602721922020206122373132*q2^11+65273755072378713353146213985613868963544189412048851721106630014059277007467059138837874973505774590453294246434008718091538654611202664086103488744167559823095908206166932666892905865933202140397907283561012303971909040336529376571274941297229909419114443244898445464472127718800891986687623074246106078985402873779115881952955507934156670490084842146264497150928870587981462785681521202086171458702666123960841264072805320162984449771499717692447829428217293748586513228592271185178363087992340023943772626459617488478577827155080297378894390197281907347082355321136128357740446636312344796403394680982963677028454503023651906280340875106406686276*q2^9-1591312768425483123336090051897937730718248955364770080809199989430173311839215900603660671480979166769365213893947207569928526598637324473309280095283890821301590947858260090533945659470769144747337815857407662912351645009710058993996743480579710657007357447427018181620262163393654921546721783951670501984689247980286722686350454553136766449548295862502010660269094681030784981377439718254415244873791475418219143575496289799186935431103937688798947474869294108624373833212752144048734902116222674947633198076636213138924628811063604932716206093140921227653602581015543694542506702827464928359028131465706196784872768635034584083748376343028470218*q2^7+19506308206952299447092814239516251356560095037419077677353269383823654688259834273753870461134838703354344357772951166001656108845870882070127565229074739140118186114604369955508366613748959183319652645739439662534546401481482828899631975408871884442712691920390859666804681022222656964597076058642794746974979250187851066156906055677487357746258814091155168297519330541140437154334522800186605009905801141452967731910336235974411208893330230327927350786496436880657033510371144141188888037488433691312227655389858223807298523631546725454710050449866520838536265215347016336386645314033495039620235989090342413778578000178434184765722314934483439*q2^5-8890033897267756946830115250570253088139146016462439207821942929228295416184120143776593807060244567129958488262835844389188648873490356709519569622124185774507443008628832679795006606750413650225529626928386127045765537105820628266184446272986556003444473471725751251004594702883910816788673350014979108068284351219659371084865501594346583549322190683998267949248693127077636255139784493668496830570213412967747034012916882792820126490426770254234688553750033247457935674997970446193270791546229381021596962864859987051659098189675935460762487204528504466922175315326819627189997282439842056774490454784475575701224308197933275439319049238562*q2^3+240033066949590808419043406309448560111325053440940634036836339426566840641534036208939545524410572261946841745871316398866349632558601377735309934064643555064097306598180359062113876256309121267164211439271756323989725958523230276649314188740612934642022241307428108648313975783122377939308718310498205495932544815825838565792919784700918795943862039307405632103334549555455231233519894771093610478693762473390261512319994207916141177727218849957690752363120795791242224013933463777467889796812433276830075687011670935438878731225634499510384820491461851146087646785643976089170709830444469485333508981584515925950672481661003493854164195*p2-24765328181853848357384873103720062928316418787504556175501132823427902197743797310768944622744105087633342964880620598858580514239402631470333260184042493201573109426919045896405739986704995462515535414647869360287542198278559853666204494718343671130250623100287998747814835095716190054465611424031455386108819801557045165156877202697693234402448282842404793039408591294719433909255256081918199603379551830258582764829709012447308801413534723542474174347746767709896011448920984062552467340743685177003369809068672997969348551687607799946320385703908572078046388767482506371573899708389433528627833977379580195574667690269115102716139751948*q2, -390290566340339964450841979725464004484168918359040029278772591371723554419219715842640841856876550753764429336494118982409565748262342792847113658594797961554695506229716114326238308950708520160125525528382198517342464502378750014015940282261952602233012386636039024484726912271080532726519308837396274649898279776328640419651075706949219870194719763592378720885364412098444676026990239992926507154227713037096638087372267682098929537653918741634954201780519749982831285200329636543364135716922946732297861468984978379800962111505423917141512401633618165385964240179317172477608505727190130370906923806993157848175041270514412429684891711438848*q2^19-94036265559049573700137647118346357576147517062868584911588711831241489320509392231083092640937154603769577006173954976880806079235850950079324856876413993057951281041749514612288300600310258502177149846839874373229058122282749106626545276386556452948183813836526192359888960812678374890251161359807639770046971989743827269274641067720863892180744210677226442585076886373352822421811626554111683684069001986053691043886611341088410705689573847754710856430156186049653691480056168434525366712118869523610977665611824342138233593023216207233145622847343578439987136474984217322984547000633054105037501516670163730349227635808124202820702611280232448*q2^17-8583835913618820574203492452075672450998789445777846939940038025087931576748605305502607495156563035623219792317822458797546454888340949199800651046269447056018663782685476241930911711484090944463934105772931817399230088197652770985050297762507055824047798416998967773905233360822320089863727682135512730733138099825758415043342773424051900586254385675423607989268580071299589054708314000841163829176949711391933117716751353169883767620125421790375348593104378837256173801765786688755883788991528134762634941091527939086458658672533806691202333679352715446246481652614317315385395226119277399311443910602617708455965957113073181893304365919953272832*q2^15+27753403905375661488424987496456453445319429211815088175271599156379790150047346964901072237051408344425455603504296587155421094532986633917607730923269787955128402509179237427283750450854554602882668802339422440761201798768302055142842192447279185445357532039448634789971631056460342659980509289455722408314613388137180456450287825925429214619487143792291069276826931583708106772989114186381235514943755024301812333898055370271615171505113415470754780810367580878915069780457636583617441382375156903327585517987246264350788235098832777365156181428253274872992641554385370877269222822099096233040727542038013255126798724513029570249119363104162313728*q2^13+68805420426715272510965415684074832410415251714680264454833735445400562521387845234226742524193284753037419283264138377880392870417165297625963868560191136982593097447091141042685687714143301956517252278196737542074429755687448175990563233677510285462320087072236030166618872334030468268819118623305383578373473400476572340653714033799985559611768168560524924134802959713288789282074109298292978629317634120466210875227618217347245659046518251392191709870181468095537438874618661012062666953177993031231437660389151584106251526392457028330346450879459768677073492114555014942648959870245694984192688653948343937538554025641909671607286977546395657652*q2^11-219407520297995989695831675671499217935731879234597533908967356146581202836972126891710935153043244495888336109670727031600374080895234564379052842779352744713447486983810050157047875919172190265948505027033324758478939482486826927538022012633700561774820657644660694813607322092622798637926283815289966356393065630361902863961604558496994215233622209227918554332974617473537695389896356892820534571904912832327366369891666738111352769201390947038213807268025355486860802822847959533322868368800913634569814358507943261393544457747319334373785897037521623904832740268540561575659362704363489220149935771804845706844436322570182987932491392631371445791*q2^9+5412285920625771775853597173065194025942082020330806347089349617853863243129258570110831222661350211530933955137170133553450380353506256441170790225412923928092610390647912313243830810135578496645086257509656715164143354625885041113840574758429916952340731463795775947355962785129745244349679374553470994124530688581767684329474344733470607402316638315374383909414981549000313493057858271504183448117670757100014021590992374880872708619746011728663415431883902808608077779254385963661579598109015530400354325864409190824681562679457270697672589180706004330133440013122980553320555546779569537294936217286021176433589909280751602228899477166376142518*q2^7-67399143184164577734161118512532542529013436301758779058578412359050392518741810300075623512168767929646400129049227940128995953594595477753066605620328666713453386630892913623484473661421085261660581489176648423803288744275683205292704106562788975116558377411402669071434572135810774401449180360195309794669071183128994382975419060400200958039132429229644644056069384853268695866329797602930301319277929761628264083294188395874222847436839061010366689335080480221165008632748220500754270978257549473572017800569468903205107859156505589305532032796314050114441173210958859894591933935454433840187737280303846595084045651403534679566296376669990069*q2^5+57767965188517067354866076614545992050932089229740265407544903101056798927925397473706005713420600011255683233042912696428768679519052550148669023326851044337411675662218167229250995297701838161931040338626868730749004107070409682776340978116004184800429663798612990334106100142469444695682024667964946998204735490746280882764069844639017310110346018032082281548476760016399225068692305610045881740222302587344867490035105806032794879031292741227552478536844644874755862407430548318352162647569955898213879995187918557220053667107393900156168256983448975079313592934636131342843948273873141928613507938100221779240408198550107724408825816638552*q2^3+480066133899181616838086812618897120222650106881881268073672678853133681283068072417879091048821144523893683491742632797732699265117202755470619868129287110128194613196360718124227752512618242534328422878543512647979451917046460553298628377481225869284044482614856217296627951566244755878617436620996410991865089631651677131585839569401837591887724078614811264206669099110910462467039789542187220957387524946780523024639988415832282355454437699915381504726241591582484448027866927554935779593624866553660151374023341870877757462451268999020769640982923702292175293571287952178341419660888938970667017963169031851901344963322006987708328390*p1+47218523162563506606359754791822860875638392954402128101232582859473190275048703674703843336324679960537904057520998432027259617667523628575634898267949658367834461224148571870659797502070405771278005365837441897251534788503664320714030806163375524926614829915308279717595020890319203574867425971354977016068108947978758631562480561492512971718962997571926373035781882812875147623470560925078967775915475769435807239417190524181497876879643846637970934629322940326995322002712994695846142907398787436812125985876944599676342828219329809465466491031847857697963005389052535368205129296996645425749682625205470110136255530902112116717254693583*q2]

(11)

``

for i to nops(GrB2) do i, indets(GrB2[i]) end do

4, {p1, q2}

(12)

``


Download solve1.mw

@Carl Love  I don't quiet understand. I took what you did, looked at "help" in Maple and after a good dose of trial and error got it to work.

@Carl Love Thank you, I also manged to use technique to built a diagonal matrix of 1's and insert a 3 x 3 matrix in lower right corner

M1:=<<Matrix(S*(dmax-1),shape=identity);Matrix(S,S&(dmax-1))>|<Matrix(S*(dmax-1),S);C||dmax>>

C||dmax is a 3 x 3 Matrix.

First 15 16 17 18 19 20 21 Page 17 of 21