Vector spaces

RadiiPolynomial defines a variety of vector spaces to represent the Banach space on which one applies the Radii Polynomial Theorem.

All spaces mentioned below are a subtype of the abstract type VectorSpace.

VectorSpace
├─ CartesianSpace
│  ├─ CartesianPower
│  └─ CartesianProduct
├─ ScalarSpace
└─ SequenceSpace
   ├─ BaseSpace
   │  ├─ Chebyshev
   │  ├─ Fourier
   │  └─ Taylor
   └─ TensorSpace

Scalar space

A ScalarSpace represents the commutative field of a parameter. This is the standard space to use for a number in $\mathbb{R}$ or $\mathbb{C}$.

julia> 𝒫 = ScalarSpace()𝕂julia> dimension(𝒫)1julia> indices(𝒫)Base.OneTo(1)

Sequence space

SequenceSpace is the abstract type for all sequence spaces.

SequenceSpace
├─ BaseSpace
│  ├─ Chebyshev
│  ├─ Fourier
│  └─ Taylor
└─ TensorSpace

BaseSpace

BaseSpace is the abstract type for all sequence spaces that are not a TensorSpace but can be interlaced to form one.

BaseSpace
├─ Chebyshev
├─ Fourier
└─ Taylor

Taylor

For a given order $K \in \mathbb{N}_0$, a Taylor sequence space is the span of $\{\phi_0, \dots, \phi_K\}$ where $\phi_k(t) \bydef t^k$ for $k = 0, \dots, K$.

julia> 𝒯 = Taylor(1)Taylor(1)julia> order(𝒯)1julia> dimension(𝒯)2julia> indices(𝒯)0:1

Fourier

For a given order $K \in \mathbb{N}_0$ and frequency $\omega \in (0, \infty)$, a Fourier sequence space is the span of $\{\phi_{-K}, \dots, \phi_K\}$ where $\phi_k(t) \bydef e^{\mathrm{i} \omega k t}$ for $k = -K, \dots, K$.

julia> = Fourier(1, 1.0)Fourier(1, 1.0)julia> order(ℱ)1julia> frequency(ℱ)1.0julia> dimension(ℱ)3julia> indices(ℱ)-1:1

Chebyshev

For a given order $K \in \mathbb{N}_0$, a Chebyshev sequence space is the span of $\{\phi_0, \phi_1, \dots, \phi_K\}$ where $\phi_0(t) \bydef 1$, $\phi_1(t) \bydef t$ and $\phi_k(t) \bydef 2 t \phi_{k-1}(t) - \phi_{k-2}(t)$ for $k = 2, \dots, K$.

It is important to note that the coefficients $\{a_0, a_1, \dots, a_K}$ associated with a Chebyshev space are normalized in the library such that $\{a_0, 2a_1, \dots, 2a_K\}$ are the standard Chebyshev coefficients.

julia> 𝒞 = Chebyshev(1)Chebyshev(1)julia> order(𝒞)1julia> dimension(𝒞)2julia> indices(𝒞)0:1

Tensor space

A TensorSpace is the tensor product of some BaseSpace. The standard constructor for TensorSpace is the (\otimes<tab>) operator.

julia> 𝒯_otimes_ℱ_otimes_𝒞 = Taylor(1)  Fourier(1, 1.0)  Chebyshev(1) # TensorSpace((Taylor(1), Fourier(1, 1.0), Chebyshev(1)))Taylor(1) ⊗ Fourier(1, 1.0) ⊗ Chebyshev(1)julia> nspaces(𝒯_otimes_ℱ_otimes_𝒞)3julia> order(𝒯_otimes_ℱ_otimes_𝒞)(1, 1, 1)julia> frequency(𝒯_otimes_ℱ_otimes_𝒞, 2)1.0julia> dimension(𝒯_otimes_ℱ_otimes_𝒞)12julia> dimensions(𝒯_otimes_ℱ_otimes_𝒞)(2, 3, 2)julia> indices(𝒯_otimes_ℱ_otimes_𝒞)TensorIndices{Tuple{UnitRange{Int64}, UnitRange{Int64}, UnitRange{Int64}}}((0:1, -1:1, 0:1))

Cartesian space

CartesianSpace is the abstract type for all cartesian spaces.

CartesianSpace
├─ CartesianPower
└─ CartesianProduct

Cartesian power

A CartesianPower is the cartesian product of an identical VectorSpace. The standard constructor for CartesianPower is the ^ operator.

julia> 𝒯² = Taylor(1) ^ 2 # CartesianPower(Taylor(1), 2)Taylor(1)²julia> nspaces(𝒯²)2julia> dimension(𝒯²)4julia> indices(𝒯²)Base.OneTo(4)

Cartesian product

A CartesianProduct is the cartesian product of some VectorSpace. The standard constructor for CartesianProduct is the × (\times<tab>) operator.

julia> 𝒫_times_𝒯 = ScalarSpace() × Taylor(1) # CartesianProduct((ScalarSpace(), Taylor(1)))𝕂 × Taylor(1)julia> nspaces(𝒫_times_𝒯)2julia> dimension(𝒫_times_𝒯)3julia> indices(𝒫_times_𝒯)Base.OneTo(3)

Symmetric space

A SymmetricSpace restricts a SequenceSpace to the subspace invariant under a group of symmetries, storing one coefficient per orbit rather than one per index. Norms account for the multiplicity of each orbit, so a norm computed in the symmetric space agrees with the norm of the same function written out in full.

The common restrictions have shorthands:

  • evensym corresponds to the invariance $u(-t) = u(t)$.
  • oddsym corresponds to the invariance $-u(-t) = u(t)$.
  • d4sym imposes the symmetries of the square on $u(x, y)$, with $u$ a periodic function.

For Fourier, evensym yields cosine series and oddsym yields sine series:

julia> indices(evensym(Fourier(3, 1.0)))0:1:3julia> indices(oddsym(Fourier(3, 1.0))) # k = 0 is not a valid representative1:1:3julia> indices(d4sym(Fourier(2, 1.0)  Fourier(2, 1.0)))6-element Vector{Tuple{Int64, Int64}}: (0, 0) (1, 0) (2, 0) (1, 1) (2, 1) (2, 2)

For Taylor and Chebyshev, evensym and oddsym select the even and odd orders, respectively:

julia> indices(evensym(Taylor(4)))0:2:4julia> indices(oddsym(Taylor(4)))1:2:3

symmetry returns the symmetry group of the space and desymmetrize strips the symmetry and returns the full space:

julia> symmetry(evensym(Fourier(3, 1.0)))Group{1, ExactReal{Rational{Int64}}}(Set(GroupElement{1, ExactReal{Rational{Int64}}}[GroupElement{1, ExactReal{Rational{Int64}}}(LatticeAut{1}([1;;]), Cocycle{1, ExactReal{Rational{Int64}}}(ExactReal{Rational{Int64}}(1//1), Rational{Int64}[0])), GroupElement{1, ExactReal{Rational{Int64}}}(LatticeAut{1}([-1;;]), Cocycle{1, ExactReal{Rational{Int64}}}(ExactReal{Rational{Int64}}(1//1), Rational{Int64}[0]))]), 0x249ff1c4dae243db)julia> desymmetrize(evensym(Fourier(3, 1.0)))Fourier(3, 1.0)
Note

Arbitrary symmetries are available by building a Group out of the generators, each represented by a GroupElement that pairs a LatticeAut $\beta_g$ on the indices with a Cocycle $\alpha_g$ on the coefficients, acting by $(g \cdot a)_k = \alpha_g(k) a_{\beta_g(k)}$.

API

RadiiPolynomial.CartesianProductType
CartesianProduct{T<:Tuple{Vararg{VectorSpace}}} <: CartesianSpace

Cartesian space resulting from the cartesian product of some VectorSpace.

Field:

  • spaces :: T

Constructors:

  • CartesianProduct(::Tuple{Vararg{VectorSpace}})
  • CartesianProduct(spaces::VectorSpace...): equivalent to CartesianProduct(spaces)
  • ×(s₁::VectorSpace, s₂::VectorSpace): equivalent to CartesianProduct((s₁, s₂))
  • ×(s₁::CartesianProduct, s₂::CartesianProduct): equivalent to CartesianProduct((s₁.spaces..., s₂.spaces...))
  • ×(s₁::CartesianProduct, s₂::VectorSpace): equivalent to CartesianProduct((s₁.spaces..., s₂))
  • ×(s₁::VectorSpace, s₂::CartesianProduct): equivalent to CartesianProduct((s₁, s₂.spaces...))

See also: ×, CartesianPower, ^(::VectorSpace, ::Int).

Examples

julia> s = CartesianProduct(Taylor(1), Fourier(2, 1.0), Chebyshev(3))Taylor(1) × Fourier(2, 1.0) × Chebyshev(3)julia> spaces(s)(Taylor(1), Fourier(2, 1.0), Chebyshev(3))julia> nspaces(s)3
source
RadiiPolynomial.ChebyshevType
Chebyshev <: BaseSpace

Sequence space whose elements are Chebyshev sequences of a prescribed order.

Field:

  • order :: Int

Constructor:

  • Chebyshev(order::Int)

See also: Taylor and Fourier.

Examples

julia> s = Chebyshev(2)Chebyshev(2)julia> order(s)2
source
RadiiPolynomial.FourierType
Fourier{T<:Real} <: BaseSpace

Sequence space whose elements are Fourier sequences of a prescribed order and frequency.

Fields:

  • order :: Int
  • frequency :: T

Constructor:

  • Fourier(order::Int, frequency::Real)

See also: Taylor and Chebyshev.

Examples

julia> s = Fourier(2, 1.0)Fourier(2, 1.0)julia> order(s)2julia> frequency(s)1.0
source
RadiiPolynomial.TaylorType
Taylor <: BaseSpace

Sequence space whose elements are Taylor sequences of a prescribed order.

Field:

  • order :: Int

Constructor:

  • Taylor(order::Int)

See also: Fourier and Chebyshev.

Examples

julia> s = Taylor(2)Taylor(2)julia> order(s)2
source
RadiiPolynomial.TensorIndicesType
TensorIndices{T<:Tuple{Vararg{AbstractRange}}}

Multidimentional rectangular range of indices for some TensorSpace.

Examples

julia> TensorIndices((0:2, -1:1))TensorIndices{Tuple{UnitRange{Int64}, UnitRange{Int64}}}((0:2, -1:1))julia> indices(Taylor(2)  Fourier(1, 1.0))TensorIndices{Tuple{UnitRange{Int64}, UnitRange{Int64}}}((0:2, -1:1))
source
RadiiPolynomial.TensorSpaceType
TensorSpace{T<:Tuple{Vararg{BaseSpace}}} <: SequenceSpace

Sequence space resulting from the tensor product of some BaseSpace.

Field:

  • spaces :: T

Constructors:

  • TensorSpace(spaces::Tuple{Vararg{BaseSpace}})
  • TensorSpace(spaces::BaseSpace...)
  • ⊗(s₁::BaseSpace, s₂::BaseSpace): equivalent to TensorSpace((s₁, s₂))
  • ⊗(s₁::TensorSpace, s₂::TensorSpace): equivalent to TensorSpace((s₁.spaces..., s₂.spaces...))
  • ⊗(s₁::TensorSpace, s₂::BaseSpace): equivalent to TensorSpace((s₁.spaces..., s₂))
  • ⊗(s₁::BaseSpace, s₂::TensorSpace): equivalent to TensorSpace((s₁, s₂.spaces...))

See also: .

Examples

julia> s = TensorSpace(Taylor(1), Fourier(2, 1.0), Chebyshev(3))Taylor(1) ⊗ Fourier(2, 1.0) ⊗ Chebyshev(3)julia> spaces(s)(Taylor(1), Fourier(2, 1.0), Chebyshev(3))
source
RadiiPolynomial.UndefSpaceType
UndefSpace <: VectorSpace

Sentinel vector space flagging an undetermined space, e.g. as returned by domain when an operator has no domain on the given space.

Example

julia> UndefSpace()undefjulia> LinearOperator(UndefSpace(), UndefSpace(), [;;])LinearOperator : undef → undef with coefficients Matrix{Any}:
source
LinearAlgebra.:×Method
×(::VectorSpace, ::VectorSpace)
×(::CartesianProduct, ::CartesianProduct)
×(::CartesianProduct, ::VectorSpace)
×(::VectorSpace, ::CartesianProduct)

Create a CartesianProduct from the cartesian product of some VectorSpace.

See also: CartesianProduct, CartesianPower and ^(::VectorSpace, ::Int).

Examples

julia> Taylor(1) × Fourier(2, 1.0)Taylor(1) × Fourier(2, 1.0)julia> Taylor(1) × Fourier(2, 1.0) × Chebyshev(3)Taylor(1) × Fourier(2, 1.0) × Chebyshev(3)julia> (Taylor(1) × Fourier(2, 1.0)) × Chebyshev(3)Taylor(1) × Fourier(2, 1.0) × Chebyshev(3)julia> Taylor(1) × (Fourier(2, 1.0) × Chebyshev(3))Taylor(1) × Fourier(2, 1.0) × Chebyshev(3)julia> ScalarSpace()^2 × ((Taylor(1)  Fourier(2, 1.0)) × Chebyshev(3))^3𝕂² × ((Taylor(1) ⊗ Fourier(2, 1.0)) × Chebyshev(3))³
source
RadiiPolynomial.:⊗Method
(s₁::BaseSpace, s₂::BaseSpace)
(s₁::TensorSpace, s₂::TensorSpace)
(s₁::TensorSpace, s₂::BaseSpace)
(s₁::BaseSpace, s₂::TensorSpace)

Create a TensorSpace from the tensor product of some SequenceSpace.

See also: TensorSpace.

Examples

julia> Taylor(1)  Fourier(2, 1.0)Taylor(1) ⊗ Fourier(2, 1.0)julia> Taylor(1)  Fourier(2, 1.0)  Chebyshev(3)Taylor(1) ⊗ Fourier(2, 1.0) ⊗ Chebyshev(3)julia> Taylor(1)  (Fourier(2, 1.0)  Chebyshev(3))Taylor(1) ⊗ Fourier(2, 1.0) ⊗ Chebyshev(3)julia> (Taylor(1)  Fourier(2, 1.0))  Chebyshev(3)Taylor(1) ⊗ Fourier(2, 1.0) ⊗ Chebyshev(3)
source
RadiiPolynomial.CocycleType
Cocycle(amplitude::Number, phase::AbstractVector{Rational{Int}})

The factor $\alpha_g(k) = \rho e^{i\pi\langle\varphi,k\rangle}$ given by an amplitude $\rho$ and a phase $\varphi$ (measured in units of $\pi$ and stored modulo 2).

Together with a LatticeAut $\beta_g$ it defines the right action

\[(g \cdot a)_k = \alpha_g(k) \, a_{\beta_g(k)},\]

under which $\alpha$ is not itself a group action but a 1-cocycle: $\alpha_{gh}(k) = \alpha_g(\beta_h(k))\,\alpha_h(k)$. Since a finite group forces $\alpha_g(k)^{|G|} = 1$, amplitude should be a root of unity.

Fields:

  • amplitude :: T
  • phase :: SVector{N,Rational{Int}}

See also: LatticeAut and GroupElement.

source
RadiiPolynomial.SymmetricSpaceType
SymmetricSpace(space::SequenceSpace, sym::Group)
SymmetricSpace(space::SequenceSpace)

Restriction of space to the subspace invariant under sym, storing one coefficient per orbit. With no group given, the trivial one is used.

indices returns the orbit representatives, so dimension shrinks accordingly, and norms account for the multiplicity of each orbit. Some symmetries are available through evensym, oddsym and d4sym; build a Group directly for anything else.

Fields:

  • space :: S
  • symmetry :: G

See also: desymmetrize, symmetry and Group.

source
RadiiPolynomial.d4symMethod
d4sym(s::TensorSpace{<:Tuple{<:Fourier,<:Fourier}})

Restrict a two-dimensional Fourier space to the subspace invariant under the dihedral group $D_4$, i.e., the symmetries of the square, generated by a quarter turn and a diagonal reflection.

Examples

julia> s = Fourier(2, 1.0)  Fourier(2, 1.0)Fourier(2, 1.0) ⊗ Fourier(2, 1.0)julia> indices(d4sym(s))6-element Vector{Tuple{Int64, Int64}}: (0, 0) (1, 0) (2, 0) (1, 1) (2, 1) (2, 2)

See also: evensym, oddsym and SymmetricSpace.

source
RadiiPolynomial.evensymMethod
evensym(s::BaseSpace)

Restrict s to the subspace of sequences invariant under the natural involution of its basis:

  • Fourier: identifies the modes k and -k, keeping k ≥ 0 (cosine series).
  • Taylor and Chebyshev: keeps the even orders only.

Examples

julia> collect(indices(evensym(Fourier(3, 1.0))))4-element Vector{Int64}: 0 1 2 3julia> collect(indices(evensym(Taylor(4))))3-element Vector{Int64}: 0 2 4

See also: oddsym, d4sym and SymmetricSpace.

source
RadiiPolynomial.oddsymMethod
oddsym(s::BaseSpace)

Restrict s to the subspace of sequences anti-invariant under the natural involution of its basis:

  • Fourier: identifies the modes k and -k together with a sign flip, keeping k > 0 (since series).
  • Taylor and Chebyshev: keeps the odd orders only.

Examples

julia> collect(indices(oddsym(Fourier(3, 1.0))))3-element Vector{Int64}: 1 2 3julia> collect(indices(oddsym(Taylor(4))))2-element Vector{Int64}: 1 3

See also: evensym, d4sym and SymmetricSpace.

source