You can also do `list(S)`, or depending on what you're doing it might be better to iterate over its elements, as Emmanuel wrote: `for u in S...`
On Sunday, November 20, 2022 at 8:54:25 AM UTC-8 gauri...@gmail.com wrote: > Oh wow! That was easy! > > Thanks so much! > G > > On Sun, Nov 20, 2022 at 3:12 PM Emmanuel Charpentier < > emanuel.c...@gmail.com> wrote: > >> No predefined method, but listing S’s elements seems easy : >> >> sage: R1.<t>=GF(97)[] >> sage: p=lambda x:x^2+2 >> sage: S=R1.quotient(p(t),'a') >> sage: L=[u for u in S] >> sage: len(L) >> 9409 >> >> HTH, >> >> Le dimanche 20 novembre 2022 à 07:39:27 UTC+1, gauri...@gmail.com a >> écrit : >> >>> I am afraid I cannot seem to find the answer to the following question >>> in the docs. >>> >>> Suppose I have finite ring? How do I list all its elements? e.g. >>> >>> ``` >>> R = PolynomialRing(GF(97),'x') >>> x = R.gen() >>> >>> p = lambda x: x^2+2 >>> S = R.quotient(p(x), 'a') >>> ``` >>> >>> I would like to list all the elements of the quotient ring S. Is there a >>> function/method that allows listing elements of S? >>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-support...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-support/5288658d-8d36-454f-9f07-8a6cadf056edn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/sage-support/5288658d-8d36-454f-9f07-8a6cadf056edn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/d1d641f6-894b-4026-b37a-efb528786779n%40googlegroups.com.