2 from sympycore
import Ring
, heads
, core
7 x
,y
,z
= map(Ring
, 'xyz')
8 zero
= P(variables
=(x
,y
))
9 assert zero
.pair
==(heads
.EXP_COEFF_DICT
, ((x
,y
), {})), `zero
.pair`
11 zero
= ((zero
+ x
) - x
)
12 assert zero
.pair
==(heads
.EXP_COEFF_DICT
, ((x
,y
), {})), `zero
.pair`
17 x
,y
,z
= map(Ring
, 'xyz')
18 one
= Ring
.Polynom(1,variables
=(x
,y
))
19 assert one
.pair
== (heads
.EXP_COEFF_DICT
, ((x
, y
), {core
.IntegerList([0,0]):1})), `one
.pair`
21 one
= Ring
.Polynom(x
,variables
=(x
,y
))/x
22 assert one
.pair
== (heads
.EXP_COEFF_DICT
, ((), {core
.IntegerList([]):1})), `one
.pair`
26 x
,y
,z
= map(Ring
, 'xyz')