1 | initial version |

z=var('z') K. = GF(32, 'a',repr='int') for k in K: print k^z

2 | No.2 Revision |

`i=var('i') K.<a> =`

~~GF(32, 'a',repr='int')~~GF(8, 'a') for k in K: print~~k^z~~`sum(k^i,i,0,3)`

~~Traceback (click to the left of this block for traceback) ... TypeError: unable to convert x (=i) to an integer~~

3 | No.3 Revision |

I met a similar problem. Take the following example.

```
i=var('i')
K.<a> = GF(8, 'a')
for k in K:
print
```~~sum(k^i,i,0,3)
~~sum(k^(2^i),i,0,3)

which prints:

```
Traceback (click to the left of this block for traceback)
...
TypeError: unable to convert x (=i) to an integer
```

Let us try another syntax.

```
i=var('i')
K.<a> = GF(8, 'a')
for k in K:
sum([x^(2^i) for i in [0..3]])
```

Now it is okay thanks to the previous answer. Is it possible to make it work with the first syntax?

4 | No.4 Revision |

I met a similar problem. Take the following example.

```
i=var('i')
K.<a> = GF(8, 'a')
for k in K:
print sum(k^(2^i),i,0,3)
```

which prints:

```
Traceback (click to the left of this block for traceback)
...
TypeError: unable to convert x (=i) to an integer
```

Let us try another syntax.

```
i=var('i')
K.<a> = GF(8, 'a')
for k in K:
sum([x^(2^i) for i in [0..3]])
```

Now it is okay thanks to the previous answer. ~~Is it ~~I wonder if it's possible to make it work with the first ~~syntax?~~syntax.

5 | No.5 Revision |

I met a similar problem. Take the following example.

```
i=var('i')
K.<a> = GF(8, 'a')
for k in K:
print sum(k^(2^i),i,0,3)
```

which prints:

```
Traceback (click to the left of this block for traceback)
...
TypeError: unable to convert x (=i) to an integer
```

Let us try another syntax.

```
i=var('i')
K.<a> = GF(8, 'a')
for k in K:
```~~sum([x^(2^i) ~~sum([k^(2^i) for i in [0..3]])

Now it is okay thanks to the previous answer. I wonder if it's possible to make it work with the first syntax.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.