From 08f6cee066607d65324250fdc6841aa01447e1c2 Mon Sep 17 00:00:00 2001 From: Morgan Rodgers Date: Mon, 19 Feb 2024 11:15:52 +0100 Subject: [PATCH 1/5] Improve docstrings for `is_conjugate`/`is_conjugate_with_data`. --- src/Groups/GAPGroups.jl | 14 +++++++++++--- src/Groups/gsets.jl | 8 +++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/Groups/GAPGroups.jl b/src/Groups/GAPGroups.jl index f0c6ab20a73f..c8578685e303 100644 --- a/src/Groups/GAPGroups.jl +++ b/src/Groups/GAPGroups.jl @@ -711,6 +711,7 @@ end Return whether `x` and `y` are conjugate elements in `G`, i.e., there is an element $z$ in `G` such that `x^`$z$ equals `y`. +To also return the element $z$, use [`is_conjugate_with_data`](@ref). """ function is_conjugate(G::GAPGroup, x::GAPGroupElem, y::GAPGroupElem) if isdefined(G,:descr) && (G.descr == :GL || G.descr == :SL) @@ -725,6 +726,8 @@ end If `x` and `y` are conjugate in `G`, return `(true, z)`, where `x^z == y` holds; otherwise, return `(false, nothing)`. +If the conjugating element `z` is not needed, +use [`is_conjugate`](@ref). """ function is_conjugate_with_data(G::GAPGroup, x::GAPGroupElem, y::GAPGroupElem) if isdefined(G,:descr) && (G.descr == :GL || G.descr == :SL) @@ -914,7 +917,10 @@ Base.:^(H::GAPGroup, y::GAPGroupElem) = conjugate_group(H, y) """ is_conjugate(G::GAPGroup, H::GAPGroup, K::GAPGroup) -Return whether `H` and `K` are conjugate subgroups in `G`. +Return whether `H` and `K` are conjugate subgroups in `G`, +i.e., whether there exists an element $z$ in `G` such that +`H^`$z$ equals `K`. To also return the element $z$ +use [`is_conjugate_with_data`](@ref). # Examples ```jldoctest @@ -942,8 +948,10 @@ is_conjugate(G::GAPGroup, H::GAPGroup, K::GAPGroup) = GAPWrap.IsConjugate(G.X,H. """ is_conjugate_with_data(G::Group, H::Group, K::Group) -If `H` and `K` are conjugate subgroups in `G`, return `true, z` -where `H^z = K`; otherwise, return `false, nothing`. +If `H` and `K` are conjugate subgroups in `G`, return `(true, z)` +where `H^z = K`; otherwise, return `(false, nothing)`. +If the conjugating element `z` is not needed, use +[`is_conjugate`](@ref). # Examples ```jldoctest diff --git a/src/Groups/gsets.jl b/src/Groups/gsets.jl index 4c67812fb99c..dd3da0799fe6 100644 --- a/src/Groups/gsets.jl +++ b/src/Groups/gsets.jl @@ -241,7 +241,7 @@ function ^(omega::ElementOfGSet, g::T) where {T<:AbstractAlgebra.GroupElem} return ElementOfGSet(Omega, fun(omega.obj, g)) end -==(omega1::ElementOfGSet, omega2::ElementOfGSet) = +==(omega1::ElementOfGSet, omega2::ElementOfGSet) = ((omega1.gset == omega2.gset) && (omega1.obj == omega2.obj)) function Base.hash(omega::ElementOfGSet, h::UInt) @@ -687,6 +687,7 @@ end Return `true` if `omega1`, `omega2` are in the same orbit of `Omega`, and `false` otherwise. +To also obtain a conjugating element $g$ use [`is_conjugate_with_data`](@ref). # Examples ```jldoctest @@ -709,9 +710,10 @@ is_conjugate(Omega::GSet, omega1, omega2) = omega2 in orbit(Omega, omega1) is_conjugate_with_data(Omega::GSet, omega1, omega2) Determine whether `omega1`, `omega2` are in the same orbit of `Omega`. -If yes, return `true, g` where `g` is an element in the group `G` of +If yes, return `(true, g)` where `g` is an element in the group `G` of `Omega` that maps `omega1` to `omega2`. -If not, return `false, nothing`. +If not, return `(false, nothing)`. +If the conjugating element $g$ is not needed, use [`is_conjugate`](@ref). # Examples ```jldoctest From 1139d5fa84dfc8114133df0c92b0bacc547da6f3 Mon Sep 17 00:00:00 2001 From: Morgan Rodgers Date: Mon, 19 Feb 2024 11:42:18 +0100 Subject: [PATCH 2/5] fix LaTeX in docstrings --- src/Groups/GAPGroups.jl | 4 ++-- src/Groups/gsets.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Groups/GAPGroups.jl b/src/Groups/GAPGroups.jl index c8578685e303..a4d60d889b49 100644 --- a/src/Groups/GAPGroups.jl +++ b/src/Groups/GAPGroups.jl @@ -710,8 +710,8 @@ end is_conjugate(G::GAPGroup, x::GAPGroupElem, y::GAPGroupElem) Return whether `x` and `y` are conjugate elements in `G`, -i.e., there is an element $z$ in `G` such that `x^`$z$ equals `y`. -To also return the element $z$, use [`is_conjugate_with_data`](@ref). +i.e., there is an element `z in `G` such that `x^z` equals `y`. +To also return the element `z`, use [`is_conjugate_with_data`](@ref). """ function is_conjugate(G::GAPGroup, x::GAPGroupElem, y::GAPGroupElem) if isdefined(G,:descr) && (G.descr == :GL || G.descr == :SL) diff --git a/src/Groups/gsets.jl b/src/Groups/gsets.jl index dd3da0799fe6..9662ef3677b5 100644 --- a/src/Groups/gsets.jl +++ b/src/Groups/gsets.jl @@ -687,7 +687,7 @@ end Return `true` if `omega1`, `omega2` are in the same orbit of `Omega`, and `false` otherwise. -To also obtain a conjugating element $g$ use [`is_conjugate_with_data`](@ref). +To also obtain a conjugating element use [`is_conjugate_with_data`](@ref). # Examples ```jldoctest @@ -713,7 +713,7 @@ Determine whether `omega1`, `omega2` are in the same orbit of `Omega`. If yes, return `(true, g)` where `g` is an element in the group `G` of `Omega` that maps `omega1` to `omega2`. If not, return `(false, nothing)`. -If the conjugating element $g$ is not needed, use [`is_conjugate`](@ref). +If the conjugating element `g` is not needed, use [`is_conjugate`](@ref). # Examples ```jldoctest From e7d4cd5ae00557fb575c4db709179e68a2ded6de Mon Sep 17 00:00:00 2001 From: Morgan Rodgers Date: Mon, 19 Feb 2024 11:48:11 +0100 Subject: [PATCH 3/5] Update src/Groups/GAPGroups.jl Co-authored-by: Tommy Hofmann --- src/Groups/GAPGroups.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groups/GAPGroups.jl b/src/Groups/GAPGroups.jl index a4d60d889b49..cdd149f65e37 100644 --- a/src/Groups/GAPGroups.jl +++ b/src/Groups/GAPGroups.jl @@ -914,7 +914,7 @@ Base.:^(H::GAPGroup, y::GAPGroupElem) = conjugate_group(H, y) # (The name is confusing because it is not clear *of which group* the result # shall be a subgroup.) -""" +@doc raw""" is_conjugate(G::GAPGroup, H::GAPGroup, K::GAPGroup) Return whether `H` and `K` are conjugate subgroups in `G`, From c77075bad1c6af3714050faf35d0f16101ac9d7b Mon Sep 17 00:00:00 2001 From: Morgan Rodgers Date: Mon, 19 Feb 2024 11:55:59 +0100 Subject: [PATCH 4/5] Update src/Groups/GAPGroups.jl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Lars Göttgens --- src/Groups/GAPGroups.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groups/GAPGroups.jl b/src/Groups/GAPGroups.jl index cdd149f65e37..7df6ac06b77b 100644 --- a/src/Groups/GAPGroups.jl +++ b/src/Groups/GAPGroups.jl @@ -710,7 +710,7 @@ end is_conjugate(G::GAPGroup, x::GAPGroupElem, y::GAPGroupElem) Return whether `x` and `y` are conjugate elements in `G`, -i.e., there is an element `z in `G` such that `x^z` equals `y`. +i.e., there is an element `z` in `G` such that `x^z` equals `y`. To also return the element `z`, use [`is_conjugate_with_data`](@ref). """ function is_conjugate(G::GAPGroup, x::GAPGroupElem, y::GAPGroupElem) From 91b0fd38940ebf8485807b3f882a08c606f5231d Mon Sep 17 00:00:00 2001 From: Morgan Rodgers Date: Thu, 22 Feb 2024 18:04:28 +0100 Subject: [PATCH 5/5] Consistently typeset `z` (no LaTeX) --- src/Groups/GAPGroups.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Groups/GAPGroups.jl b/src/Groups/GAPGroups.jl index 7df6ac06b77b..64ab8f2d7e33 100644 --- a/src/Groups/GAPGroups.jl +++ b/src/Groups/GAPGroups.jl @@ -918,8 +918,8 @@ Base.:^(H::GAPGroup, y::GAPGroupElem) = conjugate_group(H, y) is_conjugate(G::GAPGroup, H::GAPGroup, K::GAPGroup) Return whether `H` and `K` are conjugate subgroups in `G`, -i.e., whether there exists an element $z$ in `G` such that -`H^`$z$ equals `K`. To also return the element $z$ +i.e., whether there exists an element `z` in `G` such that +`H^z` equals `K`. To also return the element `z` use [`is_conjugate_with_data`](@ref). # Examples