Hi, Chris, Thank you for that. I know about the .order method, but for reasons long past, I often use ZZ[a], and I was puzzled that Sage knows that the latter is an order in the number field (hence, one would think, contained in OK), but I could see no way to persuade the program to admit that.
I’ll keep poking, but in the meantime, I can going back to making fitful progress. Justin > On Jun 12, 2025, at 00:47, chris wuthrich <[email protected]> > wrote: > > Hi Justin > > I never used ZZ[a], I would use K.order(a). As in > > sage: K.<a> = NumberField(x^4+2) > sage: OK = K.maximal_order() > sage: O = K.order(3*a) > sage: O.index_in(OK) > 729 > > Chris > On Wednesday, 11 June 2025 at 21:31:09 UTC+1 [email protected] wrote: > Hi, all, > > I am stuck in a twisty maze of passages within the number field code. Here’s > an example: > > f=x^4+2 > K.<a>=NumberField(f) > OK = K.maximal_order() > a = OK.gen() > O = ZZ[a] > O.index_in(OK) > > !Boom: not matching ambients! > > It seems as if this should work, at least if I could figure out how to patch > things together. > > Is coercion the answer? How do I do that, if so. > > Thanks for any help. > > Justin > > > > -- > 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 [email protected] > <mailto:[email protected]>. > To view this discussion visit > https://groups.google.com/d/msgid/sage-support/517419b0-15ea-42c2-af7c-cfda3ec06964n%40googlegroups.com > > <https://groups.google.com/d/msgid/sage-support/517419b0-15ea-42c2-af7c-cfda3ec06964n%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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/sage-support/0C7D8449-2FFB-4519-B5BC-57B71BD5EE30%40mac.com.
