# SPDX-License-Identifier: GPL-2.0-or-later # Modules: A homalg based package for the Abelian category of finitely presented modules over computable rings # # Implementations #
## Implementations of tool procedures.
#################################### # # methods for operations: # ####################################
left := IsHomalgLeftObjectOrMorphismOfLeftObjects( I );
I := MatrixOfSubobjectGenerators( I );
if not left then
I := Involution( I ); fi;
I := IntersectWithSubalgebra( I, var );
if not left then
I := Involution( I ); fi;
if left then
ideal := LeftSubmodule; else
ideal := RightSubmodule; fi;
return ideal( I );
end );
##
InstallMethod( MaximalIndependentSet, "for ideals",
[ IsFinitelyPresentedSubmoduleRep and ConstructedAsAnIdeal ],
function( I )
local left;
left := IsHomalgLeftObjectOrMorphismOfLeftObjects( I );
I := MatrixOfSubobjectGenerators( I );
if not left then
I := Involution( I ); fi;
return MaximalIndependentSet( I );
end );
##
InstallMethod( EliminateOverBaseRing, "for a matrix and a list",
[ IsHomalgMatrix, IsList, IsInt ],
function( M, elim, d )
local R, B, indets, L, N, n, monoms, monomStr, monomS, m,
MonomsL, monomsL, monomSL, posL, coeffs, coeffsL;
if not NumberColumns( M ) = 1then
Error( "the number of columns must be 1\n" ); fi;
R := HomalgRing( M );
if HasRelativeIndeterminatesOfPolynomialRing( R ) then
B := BaseRing( R );
indets := RelativeIndeterminatesOfPolynomialRing( R ); elif HasIndeterminatesOfPolynomialRing( R ) then
B := CoefficientsRing( R );
indets := IndeterminatesOfPolynomialRing( R ); elif IsFieldForHomalg( R ) then
return HomalgZeroMatrix( 0, 1, R ); else
TryNextMethod( ); fi;
if not IsSubset( indets, elim ) then
Error( "the second argument is not a subset of the list of indeterminates\n" ); fi;
L := Difference( indets, elim );
if d > 0then
indets := HomalgMatrix( indets, R ); fi;
while d > 0do
M := UnionOfRows( M, KroneckerMat( indets, M ) );
d := d - 1;
od;
M := EntriesOfHomalgMatrix( M );
M := List( M, Coefficients );
N := List( M, a -> a!.monomials );
n := Length( N );
M := List( M, a -> B * a );
monoms := Concatenation( N );
## check if a monomial could be reconstructed from its string
m := Length( monoms ); if m > 0then
Assert( 0, monoms[m] = String( monoms[m] ) / R ); fi;
monomStr := List( monoms, String );
monomS := Set( monomStr );
monoms := monoms{List( monomS, a -> Position( monomStr, a ) )};
m := Length( monoms );
MonomsL := Select( HomalgMatrix( monoms, m, 1, R ), L );
monomsL := EntriesOfHomalgMatrix( MonomsL );
monomSL := List( monomsL, String );
posL := List( monomSL, a -> PositionSet( monomS, a ) );
if NumberColumns( m ) = 1then
ideal := LeftSubmodule; elif NumberRows( m ) = 1then
ideal := RightSubmodule; else
Error( "the matrix of relations m of the residue class ring R has a weird shape\n" ); fi;
return ideal( m );
end );
##
InstallMethod( DefiningIdealFromNameOfResidueClassRing, "for a homalg ring and a string",
[ IsHomalgRing, IsString ],
function( R, string )
local pos1, pos2, vars, gens;
pos1 := Position( string, '[' );
if not pos1 = fail then
pos2 := Position( string, ']' );
vars := string{[ pos1 + 1 .. pos2 - 1 ]};
R := R * vars; fi;
pos1 := Position( string, '(' );
gens := "0";
if not pos1 = fail then
pos2 := Position( string, ')' );
gens := string{[ pos1 + 1 .. pos2 - 1 ]};
fi;
return LeftSubmodule( gens, R );
end );
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-10-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.