diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py index 9abc05fde03..db76127d619 100644 --- a/src/sage/categories/finite_coxeter_groups.py +++ b/src/sage/categories/finite_coxeter_groups.py @@ -291,7 +291,7 @@ def bhz_poset(self): sage: W = CoxeterGroup(['A',3], base_ring=ZZ) sage: P = W.bhz_poset(); P Finite poset containing 24 elements - sage: P.relations_number() + sage: P.number_of_relations() 103 sage: P.chain_polynomial() 34*q^4 + 90*q^3 + 79*q^2 + 24*q + 1 diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/posets.py index 7f4aa0a3e5e..297e8a9545b 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py @@ -65,7 +65,7 @@ :meth:`~FinitePoset.cardinality` | Return the number of elements in the poset. :meth:`~FinitePoset.height` | Return the number of elements in a longest chain of the poset. :meth:`~FinitePoset.width` | Return the number of elements in a longest antichain of the poset. - :meth:`~FinitePoset.relations_number` | Return the number of relations in the poset. + :meth:`~FinitePoset.number_of_relations` | Return the number of relations in the poset. :meth:`~FinitePoset.dimension` | Return the dimension of the poset. :meth:`~FinitePoset.jump_number` | Return the jump number of the poset. :meth:`~FinitePoset.magnitude` | Return the magnitude of the poset. @@ -2339,7 +2339,7 @@ def relations(self): .. SEEALSO:: - :meth:`relations_number`, :meth:`relations_iterator` + :meth:`number_of_relations`, :meth:`relations_iterator` TESTS:: @@ -2693,7 +2693,7 @@ def relations_iterator(self, strict=False): .. SEEALSO:: - :meth:`relations_number`, :meth:`relations`. + :meth:`number_of_relations`, :meth:`relations`. AUTHOR: @@ -2711,7 +2711,7 @@ def relations_iterator(self, strict=False): for j in hd.breadth_first_search(i): yield [elements[i], elements[j]] - def relations_number(self): + def number_of_relations(self): r""" Return the number of relations in the poset. @@ -2724,10 +2724,10 @@ def relations_number(self): EXAMPLES:: sage: P = posets.PentagonPoset() - sage: P.relations_number() + sage: P.number_of_relations() 13 - sage: posets.TamariLattice(4).relations_number() + sage: posets.TamariLattice(4).number_of_relations() 68 .. SEEALSO:: @@ -2736,13 +2736,15 @@ def relations_number(self): TESTS:: - sage: Poset().relations_number() + sage: Poset().number_of_relations() 0 """ return sum(1 for _ in self.relations_iterator()) # Maybe this should also be deprecated. - intervals_number = relations_number + intervals_number = number_of_relations + + relations_number = number_of_relations def linear_intervals_count(self) -> list[int]: """