Fri 2018-04-13 10:56:17 UTC, David Joyner: > > PS: About 3 years ago, a related question was posted: > > https://groups.google.com/forum/#!topic/sage-support/s59iDjhu2zU > > For some reason, the method described there is no longer implemented.
Regarding the example in the discussion you point to, a minor change gets it to work: instead of sage: C.cardinality() you can use sage: C.point_set().cardinality() Illustration below: Sage version: $ sage -v SageMath version 8.2.rc1, Release Date: 2018-03-31 Define the finite field F: sage: F.<q> = GF(13^2) sage: F Finite Field in q of size 13^2 The projective plane over F: sage: P2.<x,y,z> = toric_varieties.P2(base_ring=F) sage: P2 2-d CPR-Fano toric variety covered by 3 affine patches The curve (as a scheme): sage: C = P2.subscheme(x^8 + y^8 + z^8) sage: C Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by: x^8 + y^8 + z^8 Trying to get the cardinality fails for this scheme: sage: C.cardinality() Traceback (most recent call last) ... AttributeError: 'AlgebraicScheme_subscheme_toric_with_category' object has no attribute 'cardinality' We need to go through the point set: sage: P = C.point_set() sage: P Set of rational points of Closed subscheme of 2-d CPR-Fano toric variety covered by 3 affine patches defined by: x^8 + y^8 + z^8 Now we can get the cardinality: sage: c = P.cardinality() sage: c 512 -- 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 post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.