Skip to content

Commit

Permalink
Move types into Types.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-roehrich committed Sep 18, 2024
1 parent 76c1a85 commit b9edc0a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 24 deletions.
4 changes: 0 additions & 4 deletions experimental/LieAlgebras/src/KashiwaraCrystal.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
abstract type KashiwaraCrystal <: AbstractAlgebra.Set end

abstract type KashiwaraCrystalElem <: AbstractAlgebra.SetElem end

module KashiwaraCrystal

function e end
Expand Down
30 changes: 10 additions & 20 deletions experimental/LieAlgebras/src/PathModel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@ function adapted_string(p::KashiwaraCrystalElem, rdec::Vector{Int})
return s
end

# LS Path Model

struct LSPathModel
wt::WeightLatticeElem
ext::Dict{Vector{UInt8},ZZMatrix} # map from Weyl group elements to extremal weights

function LSPathModel(wt::WeightLatticeElem)
@req is_dominant(wt) "weight must be dominant"
return new(wt, Dict(UInt8[] => wt))
end
end
###############################################################################
#
# LS path model
#
###############################################################################

function Base.show(io::IO, mime::MIME"text/plain", P::LSPathModel)
#@show_name(io, P)
Expand Down Expand Up @@ -91,22 +85,18 @@ function root_system(P::LSPathModel)
return root_system(P.wt)
end

# LSPathModelElem
function Base.hash(s::LSPathSegment, h::UInt)
b = 0x73a37b46bd4d49b4 % UInt
h = hash(s.t, h)
h = hash(s.w, h)

struct LSPathSegment
t::QQFieldElem
w::WeylGroupElem
return xor(h, b)
end

function Base.:(==)(s1::LSPathSegment, s2::LSPathSegment)
return s1.t == s2.t && s1.w == s2.w
end

struct LSPathModelElem <: KashiwaraCrystalElem
parent::LSPathModel
s::Vector{LSPathSegment}
end

function parent(p::LSPathModelElem)
return p.parent
end
Expand Down
30 changes: 30 additions & 0 deletions experimental/LieAlgebras/src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,36 @@ struct WeylOrbitIterator
end
end

###############################################################################
#
# Kashiwara Crystals
#
###############################################################################

abstract type KashiwaraCrystal <: AbstractAlgebra.Set end

abstract type KashiwaraCrystalElem <: AbstractAlgebra.SetElem end

struct LSPathModel
wt::WeightLatticeElem
ext::Dict{Vector{UInt8},ZZMatrix} # map from Weyl group elements to extremal weights

function LSPathModel(wt::WeightLatticeElem)
@req is_dominant(wt) "weight must be dominant"
return new(wt, Dict(UInt8[] => wt))
end
end

struct LSPathSegment
t::QQFieldElem
w::WeylGroupElem
end

struct LSPathModelElem <: KashiwaraCrystalElem
parent::LSPathModel
s::Vector{LSPathSegment}
end

###############################################################################
#
# Lie algebras
Expand Down
4 changes: 4 additions & 0 deletions experimental/LieAlgebras/src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# should be included twice in LieAlgebras.jl, once to export from Oscar.LieAlgebras
# into Oscar, and once to export from Oscar.

export KashiwaraCrystal

export AbstractLieAlgebra, AbstractLieAlgebraElem
export DirectSumLieAlgebra, DirectSumLieAlgebraElem
export DualRootSpaceElem
Expand All @@ -12,6 +14,7 @@ export LieAlgebraModule, LieAlgebraModuleElem
export LieAlgebraModuleHom
export LieSubalgebra
export LinearLieAlgebra, LinearLieAlgebraElem
export LSPathModel, LSPathModelElem
export RootSpaceElem
export RootSystem
export WeightLatticeElem
Expand All @@ -20,6 +23,7 @@ export WeylOrbitIterator

export abelian_lie_algebra
export abstract_module
export adapted_string
export base_lie_algebra
export bilinear_form
export bracket
Expand Down

0 comments on commit b9edc0a

Please sign in to comment.