"Source: Text/Commut/RngDiff.text";
"Line: 4249";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Commut/RngDiff.text, line: 4249
// Example: H121E77 ()
print "Example: H121E77";
ei := GetEchoInput();
SetEchoInput(true);
S<t>:=DifferentialLaurentSeriesRing(Rationals());
RS<DS> := DifferentialOperatorRing(S);
L:=DS^9 + 2*t^-1*DS^8 + 3*t^-2*DS^7 + 2*t^-3*DS^6 + (t^-4 + 2*t^-2)*DS^5 + 
(-3*t^-5 + 5*t^-4)*DS^3 + 3*t^-5*DS^2 + (2*t^-6 + 2*t^-5)*DS + 7*t^-5;
facts := Factorisation(L);
[Degree(v[2]): v in facts];
isweaklyzero := [];
vals :=[];
for i in [1..4] do
  _,rem := EuclideanRightDivision(L, facts[i][2]);
  isweaklyzero[i] := IsWeaklyZero(rem);
  vals[i] := [Valuation(v) : v in Eltseq(rem)];
end for; 
isweaklyzero;
[Minimum(v) : v in vals];
rhf, bl := RightHandFactors(L:Precision:=30); 
bl;
[Degree(v): v in rhf];
isweaklyzero := [];
vals := [];
for i in [1..4] do
  [Degree(v): v in Eltseq(rhf[i])];
  _,rem := EuclideanRightDivision(L, rhf[i]);
  isweaklyzero[i] := IsWeaklyZero(rem);
  vals[i] := [Valuation(v) : v in Eltseq(rem)];
end for; 
isweaklyzero;
[ Minimum(v) : v in vals];
SetEchoInput(ei);
