# # file: o1.gap # purpose: O_1-related stuff # created: pasha feb 18 2005 # O1 := ReducedPolyRing (GroundField, 1); O1Basis := Basis (O1); # supposed to be # derivation in O1: f -> df/dx list := [Zero(O1)]; for i in [1..Dimension(O1)-1] do Add (list, i * O1Basis[i]); od; D := LeftModuleHomomorphismByImagesNC (O1, O1, O1Basis, list); # multiplication on x in O1: f -> xf list := []; for i in [2..Dimension(O1)] do Add (list, O1Basis[i]); od; Add (list, Zero(O1)); R := LeftModuleHomomorphismByImagesNC (O1, O1, O1Basis, list); Unbind (list); # alternative, less preferable methods to define this # (they are not linear mappings and we cannnot add them without additional work) ## derivation in O1: f -> df/dx #d := function (f) # local coeff, coeff_result, i; # coeff := Coefficients (O1Basis, f); # coeff_result := []; # for i in [1..Dimension(O1)-1] do # coeff_result[i] := i*coeff[i+1]; # od; # coeff_result[Dimension(O1)] := 0; # return (LinearCombination (O1Basis, coeff_result)); #end; # ## multiplication on x in O1: f -> xf #r := function (f) # local coeff, coeff_result, i; # coeff := Coefficients (O1Basis, f); # coeff_result := [0]; # for i in [2..Dimension(O1)] do # coeff_result[i] := coeff[i-1]; # od; # return (LinearCombination (O1Basis, coeff_result)); #end; # #D := MappingByFunction (O1, O1, d); #R := MappingByFunction (O1, O1, r); # end of o1.gap