<< "HolonomicFunctions.m"

(* Proof step 1 *)
Theta0 = (x-y)*(x^2*y-1)*(x*y^2-1)/(x*y*(1-t*(1/x+1/y+x*y)))
Theta0z = Theta0 /. x -> z
Lct = First[First[CreativeTelescoping[
	First[CreativeTelescoping[Theta0z/z/y * (x/z)/(1-x/z),
				  Der[y], {Der[z],Der[t]}]],
	Der[z], {Der[t]}]]]

(* Export for Maple *)
file = OpenWrite["Lct.mpl", PageWidth -> Infinity];
WriteString[file, "Lct := ",
	    ToString[Normal[Lct] /. Der[t] -> Dt, InputForm],
	    ":\n"]
Close[file]
			 
(* See krewint_maple.mpl for Steps 2, 3, 4 in Maple *)

(* Construction: guessing step *)

<< "Guess.m"
Theta = Expand[x*y*Expand[1/x/y CoefficientList[Series[Theta0,{t,0,10}],t]]
	       /. (x^i_ /; i<0) -> 0 /. (y^i_ /; i!=-1) -> 0];
Lg = ToOrePolynomial[GuessMinDE[Theta,TT[t]], TT[t]]

(* Verification *)
OreReduce[Lct,{Lg}]

(* Export for Maple *)
file = OpenWrite["Lg.mpl", PageWidth -> Infinity];
WriteString[file, "Lg := ",
	    ToString[Normal[Lg] /. Der[t] -> Dt, InputForm],
	    ":\n"]
Close[file]

(* See krewint_maple.mpl for the rest of the construction *)


(* Local Variables: *)
(* mode: wolfram *)
(* End: *)
