Module sage.rings.polylist_fcns
EXAMPLE: (1) put polylist.fcns.py in
/home/wdj/pythonstuff/math/william_stein/sage-v0.3-2005-06-02/local/lib/python2.4/site-packages/sage/rings
(2) type:
> cd /home/wdj/pythonstuff/math/william_stein/sage-v0.3-2005-06-02
> bin/sage
sage: import sage.rings.polylist_fcns as PList
sage: polylist1=[[2,[2,3]],[3,[1,2]],[4,[2,1]]]
sage: polylist2=[[-1,[1,3]],[-3,[1,2]],[2,[1,1]]]
sage: P1=PList.PolyList(polylist1)
sage: P2=PList.PolyList(polylist2)
sage: P1+P2
PolyList:[[2, [2, 3]], [4, [2, 1]], [-1, [1, 3]], [0, [1, 2]], [2, [1, 1]]]
sage: P3=P1+P2
sage: print P3
2x_0^2x_1^3 + 4x_0^2x_1 + -1x_0x_1^3x_0x_1^2 + 2x_0x_1
sage: P4=P1*P2
sage: P4
PolyList with distributtive representation:[[-2, [3, 6]], [-6, [3, 5]], [0, [3, 4]], [-3, [2, 5]], [-9, [2, 4]], [6, [2, 3]], [-12, [3, 3]], [8, [3, 2]]]
sage: print P4
-2x_0^3x_1^6 + -6x_0^3x_1^5x_0^3x_1^4 + -3x_0^2x_1^5 + -9x_0^2x_1^4 + 6x_0^2x_1^3 + -12x_0^3x_1^3 + 8x_0^3x_1^2
sage: polylist5=[[2,[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]],[3,[1,0,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]],[4,[2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]]]
sage: P5=PList.PolyList(polylist5)
sage: P5
PolyList with distributive representation:[[2, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]], [3, [1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]], [4, [2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]]
sage: print P5
2x_0x_1^2x_2^3x_3^4x_4^5x_5^6x_6^7x_7^8x_8^9x_9^10x_10^11x_11^12x_12^13x_13^14x_14^15x_15^16x_16^17x_17^18x_18^19x_19^20 + 3x_0x_1^0x_2^3x_3^4x_4^5x_5^6x_6^7x_7^8x_8^9x_9^10x_10^11x_11^12x_12^13x_13^14x_14^15x_15^16x_16^17x_17^18x_18^19x_19^20 + 4x_0^2x_1x_2^3x_3^4x_4^5x_5^6x_6^7x_7^8x_8^9x_9^10x_10^11x_11^12x_12^13x_13^14x_14^15x_15^16x_16^17x_17^18x_18^19x_19^20
sage:
Function Summary |
|
AddPolylists(left,
right,
monord)
|
|
coeffs_polylist(polylist)
|
|
degrevlex_monord(left,
right)
|
|
expons_polylist(polylist)
|
|
flatten(lists)
|
|
hi()
|
|
lex_monord(left,
right)
|
|
list_filtered(list,
boolprop)
|
|
list_intersection(self,
other)
|
|
list_positions(list,
x)
|
|
list_total(list)
|
|
list_union(self,
other)
|
|
MultPolylists(left,
right,
monord)
|
|
vector_add(list1,
list2)
|