# Introduction

This chapter deals with pseudo-matrices. We follow the common terminology and conventions introduced in Henri Cohen (2000), however, we operate on rows, not on columns.

Let $R$ be a Dedekind domain, typically, the maximal order of some number field $K$, further fix some finite dimensional $K$-vectorspace $V$ (with some basis), frequently $K^n$ or the $K$-structure of some extension of $K$. Since in general $R$ is not a PID, the $R$-modules in $V$ are usually not free, but still projective.

Any finitely generated $R$-module $M\subset V$ can be represented as a pseudo-matrix PMat as follows: The structure theory of $R$-modules gives the existence of (fractional) $R$-ideals $\mathfrak A_i$ and elements $\omega_i\in V$ such that $M = \sum \mathfrak A_i \omega_i$ and the sum is direct.

Following Cohen we call modules of the form $\mathfrak A\omega$ for some ideal $\mathfrak A$ and $\omega \in V$ a pseudo element. A system $(\mathfrak A_i, \omega_i)$ is called a pseudo-generating system for $M$ if $\langle \mathfrak A_i\omega_i|i\langle = M$. A pseudo-generating system is called a pseudo-basis if the $\omega_i$ are $K$-linear independent.

A pseudo-matrix $X$ is a tuple containing a vector of ideals $\mathfrak A_i$ ($1\le i\le r$) and a matrix $U\in K^{r\times n}$. The $i$-th row together with the $i$-th ideal defines a pseudo-element, thus an $R$-module, all of them together generate a module $M$.

A pseudo-matrix $X=((\mathfrak A_i)_i, U)$ is said to be in pseudo-hnf if $U$ is essentially upper triangular. Similar to the classical hnf, there is an algorithm that transforms any pseudo-matrix into one in pseudo-hnf while maintaining the module.

## Creation

In general to create a PMat one has to specify a matrix and a vector of ideals:

PseudoMatrixMethod
PseudoMatrix(m::Generic.Mat{nf_elem}, c::Vector{NfOrdIdl}) -> PMat{nf_elem, NfOrdFracIdl}

Returns the (row) pseudo matrix representing the $Z_k$-module $\sum c_i m_i$ where $c_i$ are the ideals in $c$ and $m_i$ the rows of $M$.

PseudoMatrixMethod
PseudoMatrix(m::Generic.Mat{NfOrdElem}, c::Vector{NfOrdIdl}) -> PMat{nf_elem, NfOrdFracIdl}

Returns the (row) pseudo matrix representing the $Z_k$-module $\sum c_i m_i$ where $c_i$ are the ideals in $c$ and $m_i$ the rows of $M$.

PseudoMatrixMethod
PseudoMatrix(m::Generic.Mat{NfOrdElem}) -> PMat{nf_elem, NfOrdFracIdl}

Returns the free (row) pseudo matrix representing the $Z_k$-module $\sum Z_k m_i$ where $m_i$ are the rows of $M$.

(Those functions are also available as pseudo_matrix)

## Operations

matrixMethod
matrix(M::PMat)

Returns the matrix part of the PMat.

base_ringMethod
base_ring(I::MPolyIdeal)

Return the ambient ring of I.

Examples

julia> R, (x, y) = polynomial_ring(QQ, ["x", "y"])
(Multivariate Polynomial Ring in x, y over Rational Field, QQMPolyRingElem[x, y])

julia> I = ideal(R, [x, y])^2
ideal(x^2, x*y, y^2)

julia> base_ring(I)
Multivariate Polynomial Ring in x, y over Rational Field
source
base_ring(X::AbsSpec)

On an affine scheme $X/𝕜$ over $𝕜$ this returns the ring $𝕜$.

Examples

julia> X = affine_space(QQ,3)
Affine 3-space
over Rational Field
with coordinates
3-element Vector{QQMPolyRingElem}:
x1
x2
x3

julia> base_ring(X)
Rational Field
source
base_ring(M::PMat)

The PMat $M$ defines an $R$-module for some maximal order $R$. This function returns the $R$ that was used to defined $M$.

pseudo_hnfMethod
pseudo_hnf(P::PMat)

Transforms $P$ into pseudo-Hermite form as defined by Cohen. Essentially the matrix part of $P$ will be upper triangular with some technical normalisation for the off-diagonal elements. This operation preserves the module.

A optional second argument can be specified as a symbols, indicating the desired shape of the echelon form. Possible are :upperright (the default) and :lowerleft

pseudo_hnf_with_transformMethod
pseudo_hnf_with_transform(P::PMat)

Transforms $P$ into pseudo-Hermite form as defined by Cohen. Essentially the matrix part of $P$ will be upper triangular with some technical normalisation for the off-diagonal elements. This operation preserves the module. The used transformation is returned as a second return value.

A optional second argument can be specified as a symbols, indicating the desired shape of the echelon form. Possible are :upperright (the default) and :lowerleft