On Friday, March 7, 2014 1:50:29 PM UTC, Nathann Cohen wrote:
>
> Is this method named 'is_finite' because the axiom's name is "finite" 
>

No, because the Sets.Finite class implements a "is_finite" parent method 
(which always returns True). This happens to be the only parent method that 
finite sets implement, which is why I used it in this example. Snip from 
sage/categories/finite_sets.py:

class FiniteSets(CategoryWithAxiom):
    r"""
    The category of finite sets

    EXAMPLES::

        sage: C = FiniteSets(); C
        Category of finite sets
        sage: C.super_categories()
        [Category of sets]
        sage: C.all_super_categories()
        [Category of finite sets,
         Category of sets,
         Category of sets with partial maps,
         Category of objects]
        sage: C.example()
        NotImplemented

    TESTS::

        sage: TestSuite(C).run()
        sage: C is Sets().Finite()
        True
    """

    class ParentMethods:

        def is_finite(self):
            """
            Returns ``True`` since ``self`` is finite.

            EXAMPLES::

                sage: C = FiniteEnumeratedSets().example()
                sage: C.is_finite()
                True
            """
            return True

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to