Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/AbstractTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ abstract type IdentityMap <: SetMap end

abstract type FPModuleHomomorphism <: FunctionalMap end

abstract type SkewDerivation{D,S} <: Map{D,D,Map,SkewDerivation} where {S<:Map{D,D}} end

# rings, fields etc, parameterised by an element type
# these are the type classes of different kinds of
# mathematical rings/fields/etc, which have a base ring,
Expand Down Expand Up @@ -106,6 +108,8 @@ abstract type MatRing{T<:NCRingElement} <: NCRing end

abstract type FreeAssociativeAlgebra{T<:RingElement} <: NCRing end

abstract type OreAlgebra{T<:RingElement} <: NCPolyRing{T} end

# Abstract types for number fields, parmeterised by the element type of
# the base field.
abstract type NumField{T<:RingElement} <: Field end
Expand Down Expand Up @@ -151,6 +155,8 @@ abstract type MatRingElem{T<:NCRingElement} <: NCRingElem end

abstract type FreeAssociativeAlgebraElem{T<:RingElement} <: NCRingElem end

abstract type OreOperator{T<:RingElem} <: NCPolyRingElem{T} end

abstract type NumFieldElem{T<:RingElement} <: FieldElem end

abstract type SimpleNumFieldElem{T} <: NumFieldElem{T} end
Expand Down
4 changes: 4 additions & 0 deletions src/Generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ include("generic/FreeAssociativeAlgebraGroebner.jl")

include("generic/PolyRingHom.jl")

include("generic/OreAlgebras.jl")
include("generic/PolySkewDerivation.jl")
include("generic/PolyFracFieldHom.jl")

###############################################################################
#
# Temporary miscellaneous files being moved from Hecke.jl
Expand Down
8 changes: 8 additions & 0 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -620,3 +620,11 @@ export zero!
export zero_matrix
export zeros
export zz

export ore_extension
export trivial_derivation
export derivation
export sigma_endomorphism
export OreAlgebra
export OreOperator
export SkewDerivation
61 changes: 61 additions & 0 deletions src/generic/GenericTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1607,3 +1607,64 @@ end
function PolyRingAnyMap(d::D, c::C, cm::U, ig::V) where {D, C, U, V}
return PolyRingAnyMap{D, C, U, V}(d, c, cm, ig)
end

################################################################################
#
# R-algebra morphisms of R(x)
#
################################################################################

mutable struct PolyFracFieldAnyMap{
D <: Union{FracField{<:PolyRingElem},RationalFunctionField{<:RingElement,<:PolyRingElem}},
C <: NCRing,
V <: Map{<:PolyRing,C}} <: Map{D,C,Map,PolyFracFieldAnyMap}

domain::D
morphism::V

function PolyFracFieldAnyMap{D,C,V}(d::D,phi::V) where {D,C,V}
return new{D,C,V}(d,phi)
end
end

function PolyFracFieldAnyMap(d::D,i::V) where {D,C,V<:Map{<:PolyRing,C}}
return PolyFracFieldAnyMap{D,C,V}(d,i)
end


################################################################################
#
# Univariate Ore algebra, its element type skew derivations
#
################################################################################
@attributes mutable struct OreAlgebra{T<:RingElem} <: AbstractAlgebra.OreAlgebra{T}
base_ring::Ring
D::Symbol
δ::Map(SkewDerivation)

function OreAlgebra{T}(R::Ring, D::Symbol, δ; cached=true) where T<:RingElem
return get_cached!(OreID, (R,D,δ), cached) do
new{T}(R,D,δ)
end
end
end

const OreID = CacheDictType{Tuple{Ring,Symbol,Map(SkewDerivation)},NCRing}()

mutable struct OreOperator{T<:RingElem} <: AbstractAlgebra.OreOperator{T}
parent::OreAlgebra{T}
coeffs::Vector{T}
length::Int
end

mutable struct PolySkewDerivation{D,S} <: SkewDerivation{D,S}
domain::D
σ::S
intermediate_cache::Vector{<:NCRingElem}

function PolySkewDerivation{D,S}(dom::D,σ::S,coeff::T) where {D,S,T<:NCRingElem}
return new{D,S}(dom,σ,[coeff])
end
end

Univariateish = Union{PolyRing,FracField{<:PolyRingElem},RationalFunctionField}
Loading
Loading