Commit 116f2eef authored by Hynek Baran's avatar Hynek Baran

`resolve/nonlin/combine/2` is accepting 2 arguments (to combine two sets, i....

`resolve/nonlin/combine/2` is accepting 2 arguments (to combine two sets, i. e. apply pseudoremainer on cartesian product of two sets) TODO: combinat[cartprod] is very slow  (since )
whereas
`resolve/nonlin/combine/1` apply on single set (pseudoremainder on pairs (but single call on [a,b] ~ [b,a]))
parent 3ccf166f
......@@ -146,7 +146,7 @@ read `../mc/Jets.s`;</Text-field>
</Output>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test1 as of Oct 19, 2018 (2018-10-19 09:42:25)
Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:25)</Text-field>
Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 16:35:58)</Text-field>
</Output>
</Group>
<Group labelreference="L175" drawlabel="true">
......@@ -268,7 +268,7 @@ Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:25)</Text-field>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYnLUYjNictSSZtZnJhY0dGJDYoLUYjNiUtSSVtc3VwR0YkNiUtSSNtb0dGJDYvUSsmUGFydGlhbEQ7RicvJStmb3JlZ3JvdW5kR1EuWzE0NCwxNDQsMTQ0XUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy9JK21zZW1hbnRpY3NHRiRRJmluZXJ0RicvJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRkQvJSlzdHJldGNoeUdGRC8lKnN5bW1ldHJpY0dGRC8lKGxhcmdlb3BHRkQvJS5tb3ZhYmxlbGltaXRzR0ZELyUnYWNjZW50R0ZELyUnbHNwYWNlR1EmMC4wZW1GJy8lJ3JzcGFjZUdGUy1JI21uR0YkNiRRIjJGJ0Y8LyUxc3VwZXJzY3JpcHRzaGlmdEdRIjBGJy9GOlEoWzAsMCwwXUYnRjwtRiM2Jy1GIzYmRjUtSSNtaUdGJDYlUSV1XzV4RicvJSdpdGFsaWNHUSV0cnVlRicvRj1RJ2l0YWxpY0YnRmduRjwtRjY2LVExJkludmlzaWJsZVRpbWVzO0YnRjxGQkZFRkdGSUZLRk1GT0ZRRlQtRiM2JkY1LUZebzYlUSJ4RidGYW9GZG9GZ25GPEZnbkY8LyUubGluZXRoaWNrbmVzc0dRIjFGJy8lK2Rlbm9tYWxpZ25HUSdjZW50ZXJGJy8lKW51bWFsaWduR0ZjcC8lKWJldmVsbGVkR0ZERmZvLUZebzYlUSJVRidGYW9GZG9GZ25GPC1GNjYtUSI9RidGPEZCRkVGR0ZJRktGTUZPL0ZSUSwwLjI3Nzc3NzhlbUYnL0ZVRl9xLUZXNiRGZm5GPEZnbkY8">Ly1JI3BkRzYiNiRJIlVHRiUqJkkieEdGJSIiIkkldV81eEdGJUYqIiIh</Equation></Text-field>
</Output>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">[8] &lt;1&gt; Put: </Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[8] &lt;0&gt; Put: </Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYnLUYjNictSSZtZnJhY0dGJDYoLUYjNiUtSSVtc3VwR0YkNiUtSSNtb0dGJDYvUSsmUGFydGlhbEQ7RicvJStmb3JlZ3JvdW5kR1EuWzE0NCwxNDQsMTQ0XUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy9JK21zZW1hbnRpY3NHRiRRJmluZXJ0RicvJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRkQvJSlzdHJldGNoeUdGRC8lKnN5bW1ldHJpY0dGRC8lKGxhcmdlb3BHRkQvJS5tb3ZhYmxlbGltaXRzR0ZELyUnYWNjZW50R0ZELyUnbHNwYWNlR1EmMC4wZW1GJy8lJ3JzcGFjZUdGUy1JI21uR0YkNiRRIjJGJ0Y8LyUxc3VwZXJzY3JpcHRzaGlmdEdRIjBGJy9GOlEoWzAsMCwwXUYnRjwtRiM2JS1GIzYmRjUtRjM2JS1JI21pR0YkNiVRJXVfNHhGJy8lJ2l0YWxpY0dRJXRydWVGJy9GPVEnaXRhbGljRidGVkZaRmduRjxGZ25GPC8lLmxpbmV0aGlja25lc3NHUSIxRicvJStkZW5vbWFsaWduR1EnY2VudGVyRicvJSludW1hbGlnbkdGXXAvJSliZXZlbGxlZEdGRC1GNjYtUTEmSW52aXNpYmxlVGltZXM7RidGPEZCRkVGR0ZJRktGTUZPRlFGVC1GYG82JVEiVUYnRmNvRmZvRmduRjwtRjY2LVEiPUYnRjxGQkZFRkdGSUZLRk1GTy9GUlEsMC4yNzc3Nzc4ZW1GJy9GVUZccS1GVzYkRmZuRjxGZ25GPA==">Ly1JI3BkRzYiNiRJIlVHRiUqJEkldV80eEdGJSIiIyIiIQ==</Equation></Text-field>
......@@ -469,7 +469,7 @@ Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:25)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[41] &lt;8&gt; Success!</Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">JCIlJ3ApISIk</Equation></Text-field>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">JCIlIW8pISIk</Equation></Text-field>
</Output>
</Group>
<Group hide-input="false" labelreference="L138" drawlabel="true">
......@@ -507,7 +507,7 @@ Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:25)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">Z := (map(normal@simpl,Z));</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZ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GZW82JFEiNkYnRjlGYHEtRlA2JC1GIzYnLUZXNihGaXMtRiM2JUZhc0ZbcEY5RmZwRmlwRlxxRl5xRmBxRmNxRltwRjlGOUZgcUZldUY5RmJ0LUYjNigtRmVvNiRRIzEwRidGOUZgcUZddUZgcUZjcEY5RjlGZnEtRlc2KC1GIzYlLUYjNiotRiM2Ji1GUDYkLUYjNictRlc2KEZpcy1GIzYlLUYjNiZGaG5GZXVGW3BGOUZbcEY5RmZwRmlwRlxxRl5xRmBxRmNxRltwRjlGOUZgcUZldUY5LUY2Ni1RIitGJ0Y5RjtGPkZARkJGREZGRkhGZXRGZ3QtRiM2JkZddUZgcUZmckY5Rml4LUYjNiZGanZGYHFGY3BGOUZidEZjcUY5RltwRjktRiM2JUZldUZbcEY5RmZwRmlwRlxxRl5xRltwRjlGOS8lJW9wZW5HUSJbRicvJSZjbG9zZUdRIl1GJ0ZbcEY5">NygtSSNwZEc2IjYkSSJVR0YlKiRJJnVfeHh4R0YlIiIjLUYkNiRGJyokSSV1XzV4R0YlRiotRiQ2JEYnKiZGKSIiIkYuRjIsJi1GJDYkRidJJXVfeHhHRiVGMiomLUYkNiRGJ0YuRjJJJHVfeEdGJUYyISM/LCgtRiQ2JEYnSSJ1R0YlRjIqJi1GJDYkRidGKUYyRjpGMiEiJyomRjhGMkYpRjIhIzUqJiwqKiYtRiQ2JEYnRjpGMkY6RjJGMiomRjhGMkYuRjJGMiomRkFGMkYpRjJGMkYnISIiRjJGOkZN</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L168" drawlabel="true">
......@@ -515,7 +515,7 @@ Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:25)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">lprint(Z);</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">[pd(U, u_5x^2), pd(U, u_xxx^2), pd(U, u_xxx*u_5x), pd(U, u_xx)-20*pd(U, u_5x)*u_x, pd(U, u)-6*pd(U, u_xxx)*u_x-10*pd(U, u_5x)*u_xxx, (pd(U, u_x)*u_x+pd(U, u_xxx)*u_xxx+pd(U, u_5x)*u_5x-U)/u_x]</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">[pd(U, u_xxx^2), pd(U, u_5x^2), pd(U, u_xxx*u_5x), pd(U, u_xx)-20*pd(U, u_5x)*u_x, pd(U, u)-6*pd(U, u_xxx)*u_x-10*pd(U, u_5x)*u_xxx, (pd(U, u_x)*u_x+pd(U, u_5x)*u_5x+pd(U, u_xxx)*u_xxx-U)/u_x]</Text-field>
</Output>
</Group>
<Group labelreference="L171" drawlabel="true">
......
......@@ -97,11 +97,6 @@ printf("Jets.newresolve v 0.3 as of Oct 2018 (%s)\n",
# preselect eqs to be solved
if nops(A1) = 0 then # nothing solvable found, take ALL unsolvable (to be reported and treated by nonlinear tools)
B := A;
# Reportf(2, ["Combining %a linear nonresolvable eqs...", nops(A0)]);
# A1C := `resolve/nonlin/combine`(A1S);
# Reportf(0, ["Combined %a new eqs from %a linear nonresolvable eqs", nops(A1C), nops(A0)]);
# B := [op(A), op(A1C)];
else
if nops(A1S)=0 and nops(A1H)>0 then # no simple, take 1 hard (if exists)
Reportf(2, ["No simple linear resolvable eqs found, taking hard linear resolvable (out of %a lin. solv. hard)", nops(A1H)]);
......@@ -140,11 +135,11 @@ printf("Jets.newresolve v 0.3 as of Oct 2018 (%s)\n",
# if no usable results, lets try to generate pseudoremainders of polynomial pairs
if has(`resolve/opts/postproc`, 'nonlinear') and ans = FAIL then
Reportf(2, ["No solvable eqs found, trying to combine input eqs pairs into linear by pseudodivision"]);
AE := `resolve/nonlin/combine`(A);
AE := `resolve/nonlin/combine/1`(A);
Reportf(1, ["Combining %a eqs given %a results", nops(A), nops(AE)]);
Reportf(2, ["...whitch properties are [price, size, LM, Vars, LC]:\n%s",
StringTools:-Join(map(a -> sprintf("%q\n",[a:-price,a:-size,a:-LM, a:-Vars, a:-LC]), AE))]);
ans := `resolve/lin/r`(convert(AE, set), ForceFail=ff);
Reportf(0, ["Resolving %a combined eqs (generated by pseudodivision from %a eqs) given %a results", nops(AE), nops(A), nops(ans)]);
......@@ -320,37 +315,68 @@ end:
]):
### linearize combined pairs
### linearize combined nonlinear pairs (by multiples of remainders)
`resolve/nonlin/combine/2` := proc(as::list(record), bs::list(record):=as, $)
# combine on cartesian product
local Vs, res;
# collect leading Vars
Vs := map(proc(a) a:-LV; end, convert(as,set) union convert(bs,set));
# apply `resolve/nonlin/combine/LV` on subclasses of as distinguished by leading Var
res := map(proc(LV)
local as0 := select(a -> a:-LV = LV, as);
local bs0 := select(a -> a:-LV = LV, bs);
`resolve/nonlin/combine/LV`(LV, as0, bs0)
end,
Vs);
return sizesort(map(`resolve/data/collect/detect`, res, source=''procname''), a->a:-size);
end:
`resolve/nonlin/combine` := proc(as::list(record))
`resolve/nonlin/combine/1` := proc(as::list(record), $)
# combine on pairs from single set (but single call on [a,b] ~ [b,a])
local Vs, res;
# collect leading Vars
Vs := convert(map(proc(a) a:-LV; end, as), set);
# apply `resolve/nonlin/combine/V` on subclasses of as distinguished by leading Var
res := map(proc(LV) local bs := select(a -> a:-LV = LV, as); `resolve/nonlin/combine/LV`(LV, bs) end, Vs);
Vs := map(proc(a) a:-LV; end, convert(as,set));
# apply `resolve/nonlin/combine/LV` on subclasses of as distinguished by leading Var
res := map(proc(LV)
local as0 := select(a -> a:-LV = LV, as);
`resolve/nonlin/combine/LV/1`(LV, as0)
end,
Vs);
return sizesort(map(`resolve/data/collect/detect`, res, source=''procname''), a->a:-size);
end:
`resolve/nonlin/combine/LV` := proc (LV, bs)
local cs;
Reportf(1, ["combining %a nonlinear eqs with leading Var %a", nops(bs), LV]);
return `resolve/nonlin/combine/LV/r`(bs);
`resolve/nonlin/combine/LV/2` := proc (LV, as, bs, $)
Reportf(1, ["combining %a against %a eqs with leading Var %a", nops(as), nops(bs), LV]);
return `resolve/nonlin/combine/LV/r/2`(as, bs);
end:
`resolve/nonlin/combine/LV/1` := proc (LV, as, $)
Reportf(1, ["combining %a eqs with leading Var %a", nops(as), LV]);
return `resolve/nonlin/combine/LV/r/1`(as);
end;
`resolve/nonlin/combine/LV/r` := proc(bs)
`resolve/nonlin/combine/LV/r/2` := proc(as, bs, $) ### TODO: combinat[cartprod] is maybe very slow, test it
local C, res;
C := combinat[cartprod]([as,bs]);
res := NULL;
while not C[finished] do res := res, `resolve/nonlin/combine/pair` ( op(C[nextvalue]())) end do;
end:
`resolve/nonlin/combine/LV/r/1` := proc(bs, $)
local rfg, rgf, rr;
if nops(bs) < 2 then
return NULL
else
rfg := op(map2((F,G) -> `resolve/nonlin/combine/2`(F, G) , bs[1], bs[2..-1]));
rfg := op(map2((F,G) -> `resolve/nonlin/combine/pair`(F, G) , bs[1], bs[2..-1]));
rr := thisproc(bs[2..-1]);
return rfg, rr;
fi;
end:
`resolve/nonlin/combine/2` := proc(F::record,G::record)
global `resolve/nonlin/combine/2/tool`;
`resolve/nonlin/combine/pair` := proc(F::record,G::record)
global `resolve/nonlin/combine/pair/tool`;
local f, g, LV, cf, cg, tf, tg, df, dg, res;
f := F:-expr; g := G:-expr;
Report(5, [f,g]);
......@@ -362,7 +388,7 @@ end:
fi;
Reportf(2, ["Combining polynomials in %a^%a*(%a), %a^%a*(%a)", (F:-LV), (F:-degree), (F:-LC), (G:-LV), (G:-degree), (G:-LC)]);
res := `resolve/nonlin/combine/2/tool`(F, G);
res := `resolve/nonlin/combine/pair/tool`(F, G);
if res <> NULL then
res := op(map(divideout@numer, {res}));
fi;
......@@ -370,9 +396,9 @@ end:
return res;
end:
`resolve/nonlin/combine/2/tool` := `resolve/nonlin/combine/2/pseudodivision`:
`resolve/nonlin/combine/pair/tool` := `resolve/nonlin/combine/pair/tool/pseudodivision`:
`resolve/nonlin/combine/2/pseudodivision` := proc (F::record, G::record, $)
`resolve/nonlin/combine/pair/tool/pseudodivision` := proc (F::record, G::record, $)
local res, resdata;
if F:-degree >= G:-degree then
res := Algebraic:-PseudoDivision(F:-expr, G:-expr, F:-LV);
......@@ -382,7 +408,7 @@ end:
return res;
end:
#`resolve/nonlin/combine/2/pseudorem` := proc (f, g, LCf, LCg, df::integer, dg::integer, LV, Vs::list, $)
#`resolve/nonlin/combine/pair/tool/pseudorem` := proc (f, g, LCf, LCg, df::integer, dg::integer, LV, Vs::list, $)
# description "Remainder of (appropriate multiple of f) and (g) to avoid div by 0";
# local K;
# K := LCg^(df-dg+1);
......@@ -390,7 +416,7 @@ end:
# frontend(rem, [K*f, g, LV])
#end:
#
#`resolve/nonlin/combine/2/redpseudorem` := proc (f, g, LCf, LCg, df::integer, dg::integer, LV, Vs::list, $)
#`resolve/nonlin/combine/pair/tool/redpseudorem` := proc (f, g, LCf, LCg, df::integer, dg::integer, LV, Vs::list, $)
# description "Remainder of (appropriate multiple of f, gcd used) and (g) to avoid div by 0";
# #### ??????????????????????????
# local K, Kf, Kg;
......@@ -399,20 +425,20 @@ end:
# frontend(rem, [Kg*f, g, LV])
#end:
`resolve/nonlin/combine/2/rem` := proc (F::record, G::record, $)
`resolve/nonlin/combine/pair/tool/rem` := proc (F::record, G::record, $)
local res;
if F:-degree >= G:-degree then
res := `resolve/nonlin/combine/2/rem/1`(F,G);
res := `resolve/nonlin/combine/pair/tool/rem/1`(F,G);
if F:-degree = G:-degree then
res := res, `resolve/nonlin/combine/2/rem/1`(G,F);
res := res, `resolve/nonlin/combine/pair/tool/rem/1`(G,F);
fi;
else
res := `resolve/nonlin/combine/2/rem/1`(G,F);
res := `resolve/nonlin/combine/pair/tool/rem/1`(G,F);
fi;
return res;
end:
`resolve/nonlin/combine/2/rem/1` := proc (F::record, G::record, $)
`resolve/nonlin/combine/pair/tool/rem/1` := proc (F::record, G::record, $)
local res, resdata;
res := frontend(rem, [F:-expr, G:-expr, F:-LV]);
if type(G:-LC, 'nonzero') then
......
......@@ -107,7 +107,7 @@
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test1 as of Oct 19, 2018 (2018-10-19 09:42:25)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:45)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 16:43:21)</Text-field>
</Output>
</Group>
<Group labelreference="L222" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
......
......@@ -107,7 +107,7 @@
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test1 as of Oct 19, 2018 (2018-10-19 09:42:25)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:45)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 16:43:21)</Text-field>
</Output>
</Group>
<Group labelreference="L222" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
......@@ -277,7 +277,7 @@ RESOLVE: &lt;0, 41344&gt; `resolve/1`[0]: Resolving 1 combined eqs (generated by
</Group>
<Group labelreference="L232" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">resolve(F, G,rrr)</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">time(resolve(F, G,rrr))</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">RESOLVE: &lt;0, 74112&gt; `resolve/1`[0]: There are 0 linear resolvable (0 simple and 0 hard), 0 linear NONresolvable and 3 NONlinear eqs.
......@@ -322,26 +322,15 @@ RESOLVE: &lt;2, 108932&gt; `resolve/1`[0]: Resolving 3 combined eqs (generated b
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYoLUYjNiYtRiM2KC1JI21pR0YkNiVR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iotRiM2KEZaRmduLUZebzYkUTEwLjAwMDAyMzU0NjAwMDAwRidGPUZhb0Zkb0Y9RmZvLUYjNihGXnBGZ24tRl5vNiRRJjIzNTQ2RidGPUZhb0Zkb0Y9RmZvRmRwRmFvRmRvRj1GPUZhb0Zkb0Y9RmFvRmRvRj1GYW9GZG9GPQ==">LyomLUk0QX5sYXJnZX5leHByZXNzaW9ufkc2IjYlL0klc2l6ZUdGJiQiKysrP2VDISM5L0knbGVuZ3RoRyUqcHJvdGVjdGVkRyImI2VDL0klVmFyc0dGJjciIiIiSSJVR0YmRjQsJC1GJTYlL0YpJCIrKytnYUJGLC9GLiImWU4jRjEhIiI=</Equation></Text-field>
</Output>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">SSVGQUlMRyUqcHJvdGVjdGVkRw==</Equation></Text-field>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output">JCIlcz0hIiQ=</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L234" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">collect(Algebraic:-PseudoDivision(G,rrr,U), U, length);</Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbW5HRiQ2JFEkODA2RicvJSxtYXRodmFyaWFudEdRJ25vcm1hbEYnLUkjbW9HRiQ2LVEiK0YnRi8vJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRjgvJSlzdHJldGNoeUdGOC8lKnN5bW1ldHJpY0dGOC8lKGxhcmdlb3BHRjgvJS5tb3ZhYmxlbGltaXRzR0Y4LyUnYWNjZW50R0Y4LyUnbHNwYWNlR1EsMC4yMjIyMjIyZW1GJy8lJ3JzcGFjZUdGRy1GIzYmLUYsNiRRJDkzNUYnRi8tRjM2LVExJkludmlzaWJsZVRpbWVzO0YnRi9GNkY5RjtGPUY/RkFGQy9GRlEmMC4wZW1GJy9GSUZTLUkjbWlHRiQ2JVEiVUYnLyUnaXRhbGljR1EldHJ1ZUYnL0YwUSdpdGFsaWNGJ0YvRi8=">LCYiJDEpIiIiSSJVRzYiIiROKg==</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L238" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">collect(Algebraic:-PseudoDivision(rrr, G, U), U, length);</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYoLUYjNiYtSSNtbkdGJDYkUSQxMjlGJy8lLG1hdGh2YXJpYW50R1Enbm9ybWFsRictSSNtb0dGJDYtUTEmSW52aXNpYmxlVGltZXM7RidGMS8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGOi8lKXN0cmV0Y2h5R0Y6LyUqc3ltbWV0cmljR0Y6LyUobGFyZ2VvcEdGOi8lLm1vdmFibGVsaW1pdHNHRjovJSdhY2NlbnRHRjovJSdsc3BhY2VHUSYwLjBlbUYnLyUncnNwYWNlR0ZJLUklbXN1cEdGJDYlLUkjbWlHRiQ2JVEiVUYnLyUnaXRhbGljR1EldHJ1ZUYnL0YyUSdpdGFsaWNGJy1GLjYkUSIyRidGMS8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRidGMS1GNTYtUSIrRidGMUY4RjtGPUY/RkFGQ0ZFL0ZIUSwwLjIyMjIyMjJlbUYnL0ZLRlxvLUYjNiYtRi42JFEkMTI1RidGMUY0Rk9GMUZobi1GLjYkUSQxMDFGJ0YxRjE=">LCgqJEkiVUc2IiIiIyIkSCJGJCIkRCIiJCwiIiIi</Equation></Text-field>
</Output>
</Group>
<Group labelreference="L241" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Group labelreference="L244" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment