From c8451b90eda8e538c5840e8775212a531c4f3cc2 Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Thu, 26 Sep 2024 13:40:54 +0200 Subject: [PATCH] address comments (improve syntax) --- src/Groups/homomorphisms.jl | 2 +- src/Groups/sub.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Groups/homomorphisms.jl b/src/Groups/homomorphisms.jl index 2cbe48f55bbb..40a0a68e4732 100644 --- a/src/Groups/homomorphisms.jl +++ b/src/Groups/homomorphisms.jl @@ -1297,7 +1297,7 @@ end Base.:^(x::GAPGroupElem{T},f::GAPGroupElem{AutomorphismGroup{T}}) where T <: GAPGroup = apply_automorphism(f, x, true) #Base.:^(f::GAPGroupElem{AutomorphismGroup{T}},g::GAPGroupElem{AutomorphismGroup{T}}) where T <: GAPGroup = g^-1*f*g -function (A::AutomorphismGroup{S})(f::GAPGroupHomomorphism{T,T}) where S <: GAPGroup where T <: GAPGroup +function (A::AutomorphismGroup{<: GAPGroup})(f::GAPGroupHomomorphism{T,T}) where T <: GAPGroup @assert domain(f)==A.G && codomain(f)==A.G "f not in A" @assert is_bijective(f) "f not in A" return group_element(A, GapObj(f)) diff --git a/src/Groups/sub.jl b/src/Groups/sub.jl index b9baf736aa1a..b107a3062912 100644 --- a/src/Groups/sub.jl +++ b/src/Groups/sub.jl @@ -33,7 +33,7 @@ julia> H == alternating_group(4) true ``` """ -function sub(G::GAPGroup, gens::AbstractVector{S}; check::Bool = true) where S <: GAPGroupElem +function sub(G::GAPGroup, gens::AbstractVector{<: GAPGroupElem}; check::Bool = true) if check @req all(x -> parent(x) === G || x in G, gens) "not all elements of gens lie in G" end