@@ -574,6 +574,9 @@ alphabet of *p*, and where :math:`z` is the second parameter.
574574 py::arg (" x" ),
575575 py::arg (" y" ),
576576 R"pbdoc(
577+ :sig=(p: Presentation, x: Word, y: Word) -> Word:
578+ :only-document-once:
579+
577580Return the commutator of two words.
578581
579582Returns the word :math:`x^{-1}y^{-1}xy`, after attempting to detect inverses
@@ -595,13 +598,6 @@ from the rules in *p*, using :any:`try_detect_inverses`.
595598 if *x* or *y* contains a letter not belonging to ``p.alphabet()``, if
596599 :any:`try_detect_inverses` throws, or if *x* or *y* contains a letter for
597600 which no inverse was detected.
598-
599- .. seealso::
600- * :any:`try_detect_inverses` and
601- * :any:`throw_if_letter_not_in_alphabet`.
602-
603-
604-
605601)pbdoc" );
606602 m.def (
607603 " presentation_commutator" ,
@@ -616,6 +612,9 @@ from the rules in *p*, using :any:`try_detect_inverses`.
616612 py::arg (" y" ),
617613 py::arg (" inverses" ),
618614 R"pbdoc(
615+ :sig=(p: Presentation, x: Word, y: Word, inverses: Word) -> Word:
616+ :only-document-once:
617+
619618Return the commutator of two words.
620619
621620Returns the word :math:`x^{-1}y^{-1}xy`. The letter ``a`` with index ``i`` in
@@ -639,10 +638,6 @@ Returns the word :math:`x^{-1}y^{-1}xy`. The letter ``a`` with index ``i`` in
639638:raises LibsemigroupsError:
640639 if *inverses* are not valid inverses for ``p.alphabet()``, or if *x* or
641640 *y* contains a letter not belonging to ``p.alphabet()``.
642-
643- .. seealso::
644- * :any:`throw_if_bad_inverses` and
645- * :any:`throw_if_letter_not_in_alphabet`.
646641)pbdoc" );
647642 m.def (
648643 " presentation_commutator" ,
@@ -657,6 +652,9 @@ Returns the word :math:`x^{-1}y^{-1}xy`. The letter ``a`` with index ``i`` in
657652 py::arg (" alphabet" ),
658653 py::arg (" inverses" ),
659654 R"pbdoc(
655+ :sig=(x: Word, y: Word, alphabet: Word, inverses: Word) -> Word:
656+ :only-document-once:
657+
660658Return the commutator of two words.
661659
662660Returns the word :math:`x^{-1}y^{-1}xy`. The letter ``a`` with index ``i`` in
@@ -682,11 +680,6 @@ Returns the word :math:`x^{-1}y^{-1}xy`. The letter ``a`` with index ``i`` in
682680 if *alphabet* contains duplicates, if *inverses* are not valid inverses
683681 for *alphabet*, or if *x* or *y* contains a letter not belonging to
684682 *alphabet*.
685-
686- .. seealso::
687- * :any:`throw_if_contains_duplicates`,
688- * :any:`throw_if_bad_inverses` and
689- * :any:`throw_if_word_not_over_alphabet`.
690683)pbdoc" );
691684 m.def (
692685 " presentation_add_commutator_rule" ,
@@ -708,6 +701,9 @@ Returns the word :math:`x^{-1}y^{-1}xy`. The letter ``a`` with index ``i`` in
708701 py::arg (" id" )
709702 = static_cast <typename Presentation_::letter_type>(UNDEFINED ),
710703 R"pbdoc(
704+ :sig=(p: Presentation, x: Word, y: Word, alphabet: Word, inverses: Word, *, id: Letter = UNDEFINED) -> None:
705+ :only-document-once:
706+
711707Add a commutator rule.
712708
713709Adds the rule :math:`x^{-1}y^{-1}xy = id` to *p*. The letter ``a`` with index
@@ -731,20 +727,16 @@ word.
731727:param inverses: the inverses of the letters in alphabet.
732728:type inverses: :ref:`Word<pseudo_word_type_helper>`
733729
734- :param id: the identity letter, or UNDEFINED for the empty word.
730+ :param id:
731+ the identity letter, or :any:`UNDEFINED` for the empty word. This is a
732+ keyword-only argument.
735733:type id: :ref:`Letter<pseudo_letter_type_helper>`
736734
737735:raises LibsemigroupsError:
738736 if *alphabet*, *inverses*, *x*, *y*, or *id* contains a letter not
739737 belonging to ``p.alphabet()``; if *alphabet* contains duplicates; if
740738 *inverses* are not valid inverses for *alphabet*; or if *x* or *y*
741739 contains a letter not belonging to *alphabet*.
742-
743- .. seealso::
744- * :any:`throw_if_contains_duplicates`,
745- * :any:`throw_if_bad_inverses`,
746- * :any:`throw_if_word_not_over_alphabet` and
747- * :any:`throw_if_letter_not_in_alphabet`.
748740)pbdoc" );
749741 m.def (
750742 " presentation_add_commutator_rule" ,
@@ -763,6 +755,9 @@ word.
763755 py::arg (" id" )
764756 = static_cast <typename Presentation_::letter_type>(UNDEFINED ),
765757 R"pbdoc(
758+ :sig=(p: Presentation, x: Word, y: Word, inverses: Word, *, id: Letter = UNDEFINED) -> None:
759+ :only-document-once:
760+
766761Add a commutator rule.
767762
768763Adds the rule :math:`x^{-1}y^{-1}xy = id` to *p*. The letter ``a`` with index
@@ -782,18 +777,16 @@ empty word.
782777:param inverses: the inverses of the letters in p.alphabet().
783778:type inverses: :ref:`Word<pseudo_word_type_helper>`
784779
785- :param id: the identity letter, or UNDEFINED for the empty word.
780+ :param id:
781+ the identity letter, or :any:`UNDEFINED` for the empty word. This is a
782+ keyword-only argument.
786783:type id: :ref:`Letter<pseudo_letter_type_helper>`
787784
788785
789786:raises LibsemigroupsError:
790787 if *inverses*, *x*, *y*, or *id* contains a letter not belonging to
791788 ``p.alphabet()``, or if *inverses* are not valid inverses for
792789 ``p.alphabet()``.
793-
794- .. seealso::
795- * :any:`throw_if_bad_inverses` and
796- * :any:`throw_if_letter_not_in_alphabet`.
797790)pbdoc" );
798791 m.def (
799792 " presentation_add_commutator_rule" ,
@@ -810,6 +803,9 @@ empty word.
810803 py::arg (" id" )
811804 = static_cast <typename Presentation_::letter_type>(UNDEFINED ),
812805 R"pbdoc(
806+ :sig=(p: Presentation, x: Word, y: Word, *, id: Letter = UNDEFINED) -> None:
807+ :only-document-once:
808+
813809Add a commutator rule.
814810
815811Adds the rule :math:`x^{-1}y^{-1}xy = id` to *p*, after attempting to detect
@@ -825,18 +821,15 @@ inverses from the rules in *p*, using :any:`try_detect_inverses`. If
825821:param y: the second word in the commutator.
826822:type y: :ref:`Word<pseudo_word_type_helper>`
827823
828- :param id: the identity letter, or UNDEFINED for the empty word.
824+ :param id:
825+ the identity letter, or :any:`UNDEFINED` for the empty word. This is a
826+ keyword-only argument.
829827:type id: :ref:`Letter<pseudo_letter_type_helper>`
830828
831829:raises LibsemigroupsError:
832830 if *x*, *y*, or *id* contains a letter not belonging to
833831 ``p.alphabet()``, if :any:`try_detect_inverses` throws, or if *x* or
834832 *y* contains a letter for which no inverse was detected.
835-
836- .. seealso::
837- * :any:`throw_if_letter_not_in_alphabet`,
838- * :any:`try_detect_inverses` and
839- * :any:`throw_if_word_not_over_alphabet`.
840833)pbdoc" );
841834 m.def (
842835 " presentation_are_rules_sorted" ,
0 commit comments