mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 18:15:29 +01:00
add literal_pow(^, s::GSymbol, ::Val{-1}) = inv(s)
This commit is contained in:
parent
6e14d30903
commit
31a0620da3
@ -9,6 +9,7 @@ Base.length(s::GSymbol) = first(size(s))
|
||||
Base.eltype(s::GS) where GS<:GSymbol = GS
|
||||
|
||||
Base.isone(s::GSymbol) = iszero(s.pow)
|
||||
Base.literal_pow(::typeof(^), s::Groups.GSymbol, ::Val{-1}) = inv(s)
|
||||
Base.inv(s::GSymbol) = change_pow(s, -s.pow)
|
||||
Base.hash(s::S, h::UInt) where S<:GSymbol = hash(s.id, hash(s.pow, hash(S, h)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user