Skip to content

Commit

Permalink
Removing as_left_coset
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni De Franceschi committed Jul 20, 2020
1 parent 506ac6a commit d6d6288
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 41 deletions.
29 changes: 4 additions & 25 deletions src/Groups/cosets.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export
acting_domain,
as_left_coset,
as_right_coset,
double_coset,
double_cosets,
elements,
Expand Down Expand Up @@ -93,26 +91,6 @@ Return whether the coset `c` is a right coset of its acting domain.
"""
isright(c::GroupCoset) = c.side == :right

"""
as_right_coset(c::GroupCoset)
Return a coset (either left or right) as a right coset.
"""
function as_right_coset(c::GroupCoset)
if c.side == :right return c
else return right_coset(c.H^(c.repr^-1), c.repr)
end
end

"""
as_left_coset(c::GroupCoset)
Return a coset (either left or right) as a left coset.
"""
function as_left_coset(c::GroupCoset)
if c.side == :left return c
else return left_coset(c.H^(c.repr), c.repr)
end
end

Base.:*(H::GAPGroup, g::GAPGroupElem) = right_coset(H,g)
Base.:*(g::GAPGroupElem, H::GAPGroup) = left_coset(H,g)

Expand All @@ -135,9 +113,10 @@ function Base.:*(y::GAPGroupElem, c::GroupCoset)
end

function Base.:*(c::GroupCoset, d::GroupCoset)
c1=as_right_coset(c)
d1=as_left_coset(d)
return double_coset(c1.H, c1.repr*d1.repr, d1.H)
if c.side != :right || d.side != :left
throw(ArgumentError("Wrong input"))
end
return double_coset(c.H, c.repr*d.repr, d.H)
end

"""
Expand Down
16 changes: 0 additions & 16 deletions test/Groups/subgroups_and_cosets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,6 @@ end
@test y*rc == H^(y^-1)*(y*x)
@test y*lc == (y*x)*H
@test rc*lc == double_coset(H,x^2,H)
@test as_left_coset(rc)*as_right_coset(lc)==rc*lc

@test isleft(lc*y)
@test isleft(y*lc)
@test isright(rc*y)
@test isright(y*rc)
@test lc==as_left_coset(lc)
lcr = as_right_coset(lc)
@test lc!=lcr
@test isright(lcr)
@test Set(lc)==Set(lcr)
@test rc==as_right_coset(rc)
rcl = as_left_coset(rc)
@test rc!=rcl
@test isleft(rcl)
@test Set(rc)==Set(rcl)
end

H = sub(G, [cperm(G,[1,2,3]), cperm(G,[2,3,4])])[1]
Expand Down

0 comments on commit d6d6288

Please sign in to comment.