products/Sources/formale Sprachen/GAP/pkg/matricesforhomalg/doc/chapD_mj.html
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " >
<html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en" >
<head >
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML " >
</script >
<title >GAP (MatricesForHomalg) - Appendix D: The subpackage ResidueClassRingForHomalg as a sample ring package</title >
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript" ></script >
<script type="text/javascript" >overwriteStyle();</script >
</head >
<body class="chapD" onload="jscontent()" >
<div class="chlinktop" ><span class="chlink1" >Goto Chapter: </span ><a href="chap0_mj.html" >Top</a> <a href="chap1_mj.html" >1</a> <a href="chap2_mj.html" >2</a> <a href="chap3_mj.html" >3</a> <a href="chap4_mj.html" >4</a> <a href="chap5_mj.html" >5</a> <a href="chap6_mj.html" >6</a> <a href="chapA_mj.html" >A</a> <a href="chapB_mj.html" >B</a> <a href="chapC_mj.html" >C</a> <a href="chapD_mj.html" >D</a> <a href="chapE_mj.html" >E</a> <a href="chapF_mj.html" >F</a> <a href="chapBib_mj.html" >Bib</a> <a href="chapInd_mj.html" >Ind</a> </div >
<div class="chlinkprevnexttop" > <a href="chap0_mj.html" >[Top of Book]</a> <a href="chap0_mj.html#contents" >[Contents]</a> <a href="chapC_mj.html" >[Previous Chapter]</a> <a href="chapE_mj.html" >[Next Chapter]</a> </div >
<p id="mathjaxlink" class="pcenter" ><a href="chapD.html" >[MathJax off]</a></p>
<p><a id="X7F3BA9AE7A0D245D" name="X7F3BA9AE7A0D245D" ></a></p>
<div class="ChapSects" ><a href="chapD_mj.html#X7F3BA9AE7A0D245D" >D <span class="Heading" >The subpackage <strong class="pkg" >ResidueClassRingForHomalg</strong > as a sample ring package</span ></a>
<div class="ContSect" ><span class="tocline" ><span class="nocss" > </span ><a href="chapD_mj.html#X84978AF3878A8375" >D.1 <span class="Heading" >The Mandatory Basic Operations</span ></a>
</span >
<div class="ContSSBlock" >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7AB980C5791BA204" >D.1-1 BasisOfRowModule</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7F2B3332793FACA3" >D.1-2 BasisOfColumnModule</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X83E072E1790A7D38" >D.1-3 DecideZeroRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X841426A87A1A20E4" >D.1-4 DecideZeroColumns</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X80F4836F7F175B12" >D.1-5 SyzygiesGeneratorsOfRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7899768C8304A59E" >D.1-6 SyzygiesGeneratorsOfColumns</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X78BC2E8E7A78CC82" >D.1-7 BasisOfRowsCoeff</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7D2E9D797877FFBD" >D.1-8 BasisOfColumnsCoeff</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7F10DC697D2B828D" >D.1-9 DecideZeroRowsEffectively</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7B68B9F27BC02520" >D.1-10 DecideZeroColumnsEffectively</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7DF62C5D7D2E6A6E" >D.1-11 RelativeSyzygiesGeneratorsOfRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X852F9FD8837D97A5" >D.1-12 RelativeSyzygiesGeneratorsOfColumns</a></span >
</div ></div >
<div class="ContSect" ><span class="tocline" ><span class="nocss" > </span ><a href="chapD_mj.html#X83E14F457ADC297D" >D.2 <span class="Heading" >The Mandatory Tool Operations</span ></a>
</span >
<div class="ContSSBlock" >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X81CD6BAB7CA73AFC" >D.2-1 InitialMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7D0F99857E280142" >D.2-2 InitialIdentityMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X80393225841391E7" >D.2-3 ZeroMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X811B306C81435D87" >D.2-4 IdentityMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7B322C637FC26E2D" >D.2-5 Involution</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X816CBEA6790E0C31" >D.2-6 TransposedMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7C5B29A37B13A53D" >D.2-7 CertainRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X84CBE51981BA2C77" >D.2-8 CertainColumns</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X8510678E8569799E" >D.2-9 UnionOfRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X862F756A7FC0F0D4" >D.2-10 UnionOfColumns</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X802BEBF5790D4167" >D.2-11 DiagMat</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X85F1DDDB864AF265" >D.2-12 KroneckerMat</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7E996A50863FE76C" >D.2-13 DualKroneckerMat</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7A5D229384E9D19C" >D.2-14 MulMat</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X83E1AEC781AE1274" >D.2-15 AddMat</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X79A1C9297BE0C09A" >D.2-16 SubMat</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X875447A686949D59" >D.2-17 Compose</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X78D7BABE806B82FA" >D.2-18 IsZeroMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X85CE26418598FACE" >D.2-19 NumberRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X79A76B1A7CB57518" >D.2-20 NumberColumns</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X80831B287AB565BA" >D.2-21 Determinant</a></span >
</div ></div >
<div class="ContSect" ><span class="tocline" ><span class="nocss" > </span ><a href="chapD_mj.html#X7A537DB185A0F67C" >D.3 <span class="Heading" >Some of the Recommended Tool Operations</span ></a>
</span >
<div class="ContSSBlock" >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X848EB509816E8A7D" >D.3-1 AreEqualMatrices</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X80122FB3846A6BA5" >D.3-2 IsOne</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X87B8E7137DC97A71" >D.3-3 IsDiagonalMatrix</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7EFC928C7E59CEAE" >D.3-4 ZeroRows</a></span >
<span class="ContSS" ><br /><span class="nocss" > </span ><a href="chapD_mj.html#X7E78F7D6796C7016" >D.3-5 ZeroColumns</a></span >
</div ></div >
</div >
<h3>D <span class="Heading" >The subpackage <strong class="pkg" >ResidueClassRingForHomalg</strong > as a sample ring package</span ></h3>
<p><a id="X84978AF3878A8375" name="X84978AF3878A8375" ></a></p>
<h4>D.1 <span class="Heading" >The Mandatory Basic Operations</span ></h4>
<p><a id="X7AB980C5791BA204" name="X7AB980C5791BA204" ></a></p>
<h5>D.1-1 BasisOfRowModule</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ BasisOfRowModule</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
BasisOfRowModule :=
function( M )
local Mrel;
Mrel := StackedRelations( M );
Mrel := HomalgResidueClassMatrix(
BasisOfRowModule( Mrel ), HomalgRing( M ) );
return GetRidOfObsoleteRows( Mrel );
end,
</pre ></div >
<p><a id="X7F2B3332793FACA3" name="X7F2B3332793FACA3" ></a></p>
<h5>D.1-2 BasisOfColumnModule</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ BasisOfColumnModule</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
BasisOfColumnModule :=
function( M )
local Mrel;
Mrel := AugmentedRelations( M );
Mrel := HomalgResidueClassMatrix(
BasisOfColumnModule( Mrel ), HomalgRing( M ) );
return GetRidOfObsoleteColumns( Mrel );
end,
</pre ></div >
<p><a id="X83E072E1790A7D38" name="X83E072E1790A7D38" ></a></p>
<h5>D.1-3 DecideZeroRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DecideZeroRows</code >( <var class="Arg" >A</var >, <var class="Arg" >B</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
DecideZeroRows :=
function( A, B )
local Brel;
Brel := StackedRelations( B );
Brel := BasisOfRowModule( Brel );
return HomalgResidueClassMatrix(
DecideZeroRows( Eval( A ), Brel ), HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X841426A87A1A20E4" name="X841426A87A1A20E4" ></a></p>
<h5>D.1-4 DecideZeroColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DecideZeroColumns</code >( <var class="Arg" >A</var >, <var class="Arg" >B</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
DecideZeroColumns :=
function( A, B )
local Brel;
Brel := AugmentedRelations( B );
Brel := BasisOfColumnModule( Brel );
return HomalgResidueClassMatrix(
DecideZeroColumns( Eval( A ), Brel ), HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X80F4836F7F175B12" name="X80F4836F7F175B12" ></a></p>
<h5>D.1-5 SyzygiesGeneratorsOfRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ SyzygiesGeneratorsOfRows</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
SyzygiesGeneratorsOfRows :=
function( M )
local R, ring_rel, rel, S;
R := HomalgRing( M );
ring_rel := RingRelations( R );
rel := MatrixOfRelations( ring_rel );
if IsHomalgRingRelationsAsGeneratorsOfRightIdeal( ring_rel ) then
rel := Involution( rel );
fi;
rel := DiagMat( ListWithIdenticalEntries( NumberColumns( M ), rel ) );
S := SyzygiesGeneratorsOfRows( Eval( M ), rel );
S := HomalgResidueClassMatrix( S, R );
S := GetRidOfObsoleteRows( S );
if IsZero( S ) then
SetIsLeftRegular( M, true );
fi;
return S;
end,
</pre ></div >
<p><a id="X7899768C8304A59E" name="X7899768C8304A59E" ></a></p>
<h5>D.1-6 SyzygiesGeneratorsOfColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ SyzygiesGeneratorsOfColumns</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
SyzygiesGeneratorsOfColumns :=
function( M )
local R, ring_rel, rel, S;
R := HomalgRing( M );
ring_rel := RingRelations( R );
rel := MatrixOfRelations( ring_rel );
if IsHomalgRingRelationsAsGeneratorsOfLeftIdeal( ring_rel ) then
rel := Involution( rel );
fi;
rel := DiagMat( ListWithIdenticalEntries( NumberRows( M ), rel ) );
S := SyzygiesGeneratorsOfColumns( Eval( M ), rel );
S := HomalgResidueClassMatrix( S, R );
S := GetRidOfObsoleteColumns( S );
if IsZero( S ) then
SetIsRightRegular( M, true );
fi;
return S;
end,
</pre ></div >
<p><a id="X78BC2E8E7A78CC82" name="X78BC2E8E7A78CC82" ></a></p>
<h5>D.1-7 BasisOfRowsCoeff</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ BasisOfRowsCoeff</code >( <var class="Arg" >M</var >, <var class="Arg" >T</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
BasisOfRowsCoeff :=
function( M, T )
local Mrel, TT , bas, nz;
Mrel := StackedRelations( M );
TT := HomalgVoidMatrix( HomalgRing( Mrel ) );
bas := BasisOfRowsCoeff( Mrel, TT );
bas := HomalgResidueClassMatrix( bas, HomalgRing( M ) );
nz := NonZeroRows( bas );
SetEval( T, CertainRows( CertainColumns( TT , [ 1 .. NumberRows( M ) ] ), nz ) );
ResetFilterObj( T, IsVoidMatrix );
## the generic BasisOfRowsCoeff will assume that
## ( NumberRows( B ) = 0 ) = IsZero( B )
return CertainRows( bas, nz );
end,
</pre ></div >
<p><a id="X7D2E9D797877FFBD" name="X7D2E9D797877FFBD" ></a></p>
<h5>D.1-8 BasisOfColumnsCoeff</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ BasisOfColumnsCoeff</code >( <var class="Arg" >M</var >, <var class="Arg" >T</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
BasisOfColumnsCoeff :=
function( M, T )
local Mrel, TT , bas, nz;
Mrel := AugmentedRelations( M );
TT := HomalgVoidMatrix( HomalgRing( Mrel ) );
bas := BasisOfColumnsCoeff( Mrel, TT );
bas := HomalgResidueClassMatrix( bas, HomalgRing( M ) );
nz := NonZeroColumns( bas );
SetEval( T, CertainColumns( CertainRows( TT , [ 1 .. NumberColumns( M ) ] ), nz ) );
ResetFilterObj( T, IsVoidMatrix );
## the generic BasisOfColumnsCoeff will assume that
## ( NumberColumns( B ) = 0 ) = IsZero( B )
return CertainColumns( bas, nz );
end,
</pre ></div >
<p><a id="X7F10DC697D2B828D" name="X7F10DC697D2B828D" ></a></p>
<h5>D.1-9 DecideZeroRowsEffectively</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DecideZeroRowsEffectively</code >( <var class="Arg" >A</var >, <var class="Arg" >B</var >, <var class="Arg" >T</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
DecideZeroRowsEffectively :=
function( A, B, T )
local Brel, TT , red;
Brel := StackedRelations( B );
TT := HomalgVoidMatrix( HomalgRing( Brel ) );
red := DecideZeroRowsEffectively( Eval( A ), Brel, TT );
SetEval( T, CertainColumns( TT , [ 1 .. NumberRows( B ) ] ) );
ResetFilterObj( T, IsVoidMatrix );
return HomalgResidueClassMatrix( red, HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X7B68B9F27BC02520" name="X7B68B9F27BC02520" ></a></p>
<h5>D.1-10 DecideZeroColumnsEffectively</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DecideZeroColumnsEffectively</code >( <var class="Arg" >A</var >, <var class="Arg" >B</var >, <var class="Arg" >T</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
DecideZeroColumnsEffectively :=
function( A, B, T )
local Brel, TT , red;
Brel := AugmentedRelations( B );
TT := HomalgVoidMatrix( HomalgRing( Brel ) );
red := DecideZeroColumnsEffectively( Eval( A ), Brel, TT );
SetEval( T, CertainRows( TT , [ 1 .. NumberColumns( B ) ] ) );
ResetFilterObj( T, IsVoidMatrix );
return HomalgResidueClassMatrix( red, HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X7DF62C5D7D2E6A6E" name="X7DF62C5D7D2E6A6E" ></a></p>
<h5>D.1-11 RelativeSyzygiesGeneratorsOfRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ RelativeSyzygiesGeneratorsOfRows</code >( <var class="Arg" >M</var >, <var class="Arg" >M2</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
RelativeSyzygiesGeneratorsOfRows :=
function( M, M2 )
local M2rel, S;
M2rel := StackedRelations( M2 );
S := SyzygiesGeneratorsOfRows( Eval( M ), M2rel );
S := HomalgResidueClassMatrix( S, HomalgRing( M ) );
S := GetRidOfObsoleteRows( S );
if IsZero( S ) then
SetIsLeftRegular( M, true );
fi;
return S;
end,
</pre ></div >
<p><a id="X852F9FD8837D97A5" name="X852F9FD8837D97A5" ></a></p>
<h5>D.1-12 RelativeSyzygiesGeneratorsOfColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ RelativeSyzygiesGeneratorsOfColumns</code >( <var class="Arg" >M</var >, <var class="Arg" >M2</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<div class="example" ><pre >
RelativeSyzygiesGeneratorsOfColumns :=
function( M, M2 )
local M2rel, S;
M2rel := AugmentedRelations( M2 );
S := SyzygiesGeneratorsOfColumns( Eval( M ), M2rel );
S := HomalgResidueClassMatrix( S, HomalgRing( M ) );
S := GetRidOfObsoleteColumns( S );
if IsZero( S ) then
SetIsRightRegular( M, true );
fi;
return S;
end,
</pre ></div >
<p><a id="X83E14F457ADC297D" name="X83E14F457ADC297D" ></a></p>
<h4>D.2 <span class="Heading" >The Mandatory Tool Operations</span ></h4>
<p>Here we list those matrix operations for which <strong class="pkg" >homalg</strong > provides no fallback method.</p>
<p><a id="X81CD6BAB7CA73AFC" name="X81CD6BAB7CA73AFC" ></a></p>
<h5>D.2-1 InitialMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ InitialMatrix</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >InitialMatrix</code > (<a href="chapB_mj.html#X7DBA33F083A317B5" ><span class="RefLink" >B.1-1</span ></a>))</p>
<div class="example" ><pre >
InitialMatrix := C -> HomalgInitialMatrix(
NumberRows( C ), NumberColumns( C ), AmbientRing( HomalgRing( C ) ) ),
</pre ></div >
<p><a id="X7D0F99857E280142" name="X7D0F99857E280142" ></a></p>
<h5>D.2-2 InitialIdentityMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ InitialIdentityMatrix</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >InitialIdentityMatrix</code > (<a href="chapB_mj.html#X84179BE87E7DCE76" ><span class="RefLink" >B.1-2</span ></a>))</p>
<div class="example" ><pre >
InitialIdentityMatrix := C -> HomalgInitialIdentityMatrix(
NumberRows( C ), AmbientRing( HomalgRing( C ) ) ),
</pre ></div >
<p><a id="X80393225841391E7" name="X80393225841391E7" ></a></p>
<h5>D.2-3 ZeroMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ ZeroMatrix</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >ZeroMatrix</code > (<a href="chapB_mj.html#X785390E38396CAEB" ><span class="RefLink" >B.1-3</span ></a>))</p>
<div class="example" ><pre >
ZeroMatrix := C -> HomalgZeroMatrix(
NumberRows( C ), NumberColumns( C ), AmbientRing( HomalgRing( C ) ) ),
</pre ></div >
<p><a id="X811B306C81435D87" name="X811B306C81435D87" ></a></p>
<h5>D.2-4 IdentityMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ IdentityMatrix</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >IdentityMatrix</code > (<a href="chapB_mj.html#X87BFF3567DEEBEF4" ><span class="RefLink" >B.1-4</span ></a>))</p>
<div class="example" ><pre >
IdentityMatrix := C -> HomalgIdentityMatrix(
NumberRows( C ), AmbientRing( HomalgRing( C ) ) ),
</pre ></div >
<p><a id="X7B322C637FC26E2D" name="X7B322C637FC26E2D" ></a></p>
<h5>D.2-5 Involution</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Involution</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >Involution</code > (<a href="chapB_mj.html#X85884C3178473521" ><span class="RefLink" >B.1-5</span ></a>))</p>
<div class="example" ><pre >
Involution :=
function( M )
local N, R;
N := Involution( Eval( M ) );
R := HomalgRing( N );
if not ( HasIsCommutative( R ) and IsCommutative( R ) and
HasIsReducedModuloRingRelations( M ) and
IsReducedModuloRingRelations( M ) ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( M ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X816CBEA6790E0C31" name="X816CBEA6790E0C31" ></a></p>
<h5>D.2-6 TransposedMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ TransposedMatrix</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >TransposedMatrix</code > (<a href="chapB_mj.html#X7AD2EEE680DF472B" ><span class="RefLink" >B.1-6</span ></a>))</p>
<div class="example" ><pre >
TransposedMatrix :=
function( M )
local N, R;
N := TransposedMatrix( Eval( M ) );
R := HomalgRing( N );
if not ( HasIsCommutative( R ) and IsCommutative( R ) and
HasIsReducedModuloRingRelations( M ) and
IsReducedModuloRingRelations( M ) ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( M ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X7C5B29A37B13A53D" name="X7C5B29A37B13A53D" ></a></p>
<h5>D.2-7 CertainRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ CertainRows</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >CertainRows</code > (<a href="chapB_mj.html#X7B6FC3267CD9EE9D" ><span class="RefLink" >B.1-7</span ></a>))</p>
<div class="example" ><pre >
CertainRows :=
function( M, plist )
local N;
N := CertainRows( Eval( M ), plist );
if not ( HasIsReducedModuloRingRelations( M ) and
IsReducedModuloRingRelations( M ) ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( M ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X84CBE51981BA2C77" name="X84CBE51981BA2C77" ></a></p>
<h5>D.2-8 CertainColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ CertainColumns</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >CertainColumns</code > (<a href="chapB_mj.html#X78EADFC67D17CF04" ><span class="RefLink" >B.1-8</span ></a>))</p>
<div class="example" ><pre >
CertainColumns :=
function( M, plist )
local N;
N := CertainColumns( Eval( M ), plist );
if not ( HasIsReducedModuloRingRelations( M ) and
IsReducedModuloRingRelations( M ) ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( M ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X8510678E8569799E" name="X8510678E8569799E" ></a></p>
<h5>D.2-9 UnionOfRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ UnionOfRows</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >UnionOfRows</code > (<a href="chapB_mj.html#X7DEB535782A3323E" ><span class="RefLink" >B.1-9</span ></a>))</p>
<div class="example" ><pre >
UnionOfRows :=
function( L )
local N;
N := UnionOfRows( List( L, Eval ) );
if not ForAll( L, HasIsReducedModuloRingRelations and
IsReducedModuloRingRelations ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( L[1] ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X862F756A7FC0F0D4" name="X862F756A7FC0F0D4" ></a></p>
<h5>D.2-10 UnionOfColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ UnionOfColumns</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >UnionOfColumns</code > (<a href="chapB_mj.html#X7DF5DB55836D13A7" ><span class="RefLink" >B.1-11</span ></a>))</p>
<div class="example" ><pre >
UnionOfColumns :=
function( L )
local N;
N := UnionOfColumns( List( L, Eval ) );
if not ForAll( L, HasIsReducedModuloRingRelations and
IsReducedModuloRingRelations ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( L[1] ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X802BEBF5790D4167" name="X802BEBF5790D4167" ></a></p>
<h5>D.2-11 DiagMat</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DiagMat</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >DiagMat</code > (<a href="chapB_mj.html#X86C5B86981FA1F9A" ><span class="RefLink" >B.1-13</span ></a>))</p>
<div class="example" ><pre >
DiagMat :=
function( e )
local N;
N := DiagMat( List( e, Eval ) );
if not ForAll( e, HasIsReducedModuloRingRelations and
IsReducedModuloRingRelations ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( e[1] ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X85F1DDDB864AF265" name="X85F1DDDB864AF265" ></a></p>
<h5>D.2-12 KroneckerMat</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ KroneckerMat</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >KroneckerMat</code > (<a href="chapB_mj.html#X82202A6A7FAB7174" ><span class="RefLink" >B.1-14</span ></a>))</p>
<div class="example" ><pre >
KroneckerMat :=
function( A, B )
local N;
N := KroneckerMat( Eval( A ), Eval( B ) );
if not ForAll( [ A, B ], HasIsReducedModuloRingRelations and
IsReducedModuloRingRelations ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( A ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X7E996A50863FE76C" name="X7E996A50863FE76C" ></a></p>
<h5>D.2-13 DualKroneckerMat</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ DualKroneckerMat</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >DualKroneckerMat</code > (<a href="chapB_mj.html#X87E0747D7FEEAC76" ><span class="RefLink" >B.1-15</span ></a>))</p>
<div class="example" ><pre >
DualKroneckerMat :=
function( A, B )
local N;
N := DualKroneckerMat( Eval( A ), Eval( B ) );
if not ForAll( [ A, B ], HasIsReducedModuloRingRelations and
IsReducedModuloRingRelations ) then
## reduce the matrix N w.r.t. the ring relations
N := DecideZero( N, HomalgRing( A ) );
fi;
return N;
end,
</pre ></div >
<p><a id="X7A5D229384E9D19C" name="X7A5D229384E9D19C" ></a></p>
<h5>D.2-14 MulMat</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ MulMat</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >MulMat</code > (<a href="chapB_mj.html#X828F8C7785EEC3D1" ><span class="RefLink" >B.1-16</span ></a>))</p>
<div class="example" ><pre >
MulMat :=
function( a, A )
return DecideZero( EvalRingElement( a ) * Eval( A ), HomalgRing( A ) );
end,
MulMatRight :=
function( A, a )
return DecideZero( Eval( A ) * EvalRingElement( a ), HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X83E1AEC781AE1274" name="X83E1AEC781AE1274" ></a></p>
<h5>D.2-15 AddMat</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ AddMat</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >AddMat</code > (<a href="chapB_mj.html#X7B0B12F080A90039" ><span class="RefLink" >B.1-17</span ></a>))</p>
<div class="example" ><pre >
AddMat :=
function( A, B )
return DecideZero( Eval( A ) + Eval( B ), HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X79A1C9297BE0C09A" name="X79A1C9297BE0C09A" ></a></p>
<h5>D.2-16 SubMat</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ SubMat</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >SubMat</code > (<a href="chapB_mj.html#X7FE11AA27AE7D2D7" ><span class="RefLink" >B.1-18</span ></a>))</p>
<div class="example" ><pre >
SubMat :=
function( A, B )
return DecideZero( Eval( A ) - Eval( B ), HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X875447A686949D59" name="X875447A686949D59" ></a></p>
<h5>D.2-17 Compose</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Compose</code >( )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >Compose</code > (<a href="chapB_mj.html#X7D491D957E63C3A4" ><span class="RefLink" >B.1-19</span ></a>))</p>
<div class="example" ><pre >
Compose :=
function( A, B )
return DecideZero( Eval( A ) * Eval( B ), HomalgRing( A ) );
end,
</pre ></div >
<p><a id="X78D7BABE806B82FA" name="X78D7BABE806B82FA" ></a></p>
<h5>D.2-18 IsZeroMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ IsZeroMatrix</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: <code class="code" >true</code > or <code class="code" >false</code ></p>
<p>(--> <code class="func" >IsZeroMatrix</code > (<a href="chapB_mj.html#X849BB912798A01EB" ><span class="RefLink" >B.1-20</span ></a>))</p>
<div class="example" ><pre >
IsZeroMatrix := M -> IsZero( DecideZero( Eval( M ), HomalgRing( M ) ) ),
</pre ></div >
<p><a id="X85CE26418598FACE" name="X85CE26418598FACE" ></a></p>
<h5>D.2-19 NumberRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ NumberRows</code >( <var class="Arg" >C</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a nonnegative integer</p>
<p>(--> <code class="func" >NumberRows</code > (<a href="chapB_mj.html#X7F4D7FAF821DA1C2" ><span class="RefLink" >B.1-21</span ></a>))</p>
<div class="example" ><pre >
NumberRows := C -> NumberRows( Eval( C ) ),
</pre ></div >
<p><a id="X79A76B1A7CB57518" name="X79A76B1A7CB57518" ></a></p>
<h5>D.2-20 NumberColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ NumberColumns</code >( <var class="Arg" >C</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a nonnegative integer</p>
<p>(--> <code class="func" >NumberColumns</code > (<a href="chapB_mj.html#X7DFA534B7AFA2E17" ><span class="RefLink" >B.1-22</span ></a>))</p>
<div class="example" ><pre >
NumberColumns := C -> NumberColumns( Eval( C ) ),
</pre ></div >
<p><a id="X80831B287AB565BA" name="X80831B287AB565BA" ></a></p>
<h5>D.2-21 Determinant</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ Determinant</code >( <var class="Arg" >C</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: an element of ambient <strong class="pkg" >homalg</strong > ring</p>
<p>(--> <code class="func" >Determinant</code > (<a href="chapB_mj.html#X80A573257D7F2E1A" ><span class="RefLink" >B.1-23</span ></a>))</p>
<div class="example" ><pre >
Determinant := C -> DecideZero( Determinant( Eval( C ) ), HomalgRing( C ) ),
</pre ></div >
<p><a id="X7A537DB185A0F67C" name="X7A537DB185A0F67C" ></a></p>
<h4>D.3 <span class="Heading" >Some of the Recommended Tool Operations</span ></h4>
<p>Here we list those matrix operations for which <strong class="pkg" >homalg</strong > does provide a fallback method. But specifying the below <code class="code" >homalgTable</code > functions increases the performance by replacing the fallback method.</p>
<p><a id="X848EB509816E8A7D" name="X848EB509816E8A7D" ></a></p>
<h5>D.3-1 AreEqualMatrices</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ AreEqualMatrices</code >( <var class="Arg" >A</var >, <var class="Arg" >B</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: <code class="code" >true</code > or <code class="code" >false</code ></p>
<p>(--> <code class="func" >AreEqualMatrices</code > (<a href="chapB_mj.html#X7871FE5478BFC167" ><span class="RefLink" >B.2-1</span ></a>))</p>
<div class="example" ><pre >
AreEqualMatrices :=
function( A, B )
return IsZero( DecideZero( Eval( A ) - Eval( B ), HomalgRing( A ) ) );
end,
</pre ></div >
<p><a id="X80122FB3846A6BA5" name="X80122FB3846A6BA5" ></a></p>
<h5>D.3-2 IsOne</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ IsOne</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: <code class="code" >true</code > or <code class="code" >false</code ></p>
<p>(--> <code class="func" >IsIdentityMatrix</code > (<a href="chapB_mj.html#X80C1856D82172268" ><span class="RefLink" >B.2-2</span ></a>))</p>
<div class="example" ><pre >
IsIdentityMatrix := M ->
IsOne( DecideZero( Eval( M ), HomalgRing( M ) ) ),
</pre ></div >
<p><a id="X87B8E7137DC97A71" name="X87B8E7137DC97A71" ></a></p>
<h5>D.3-3 IsDiagonalMatrix</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ IsDiagonalMatrix</code >( <var class="Arg" >M</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: <code class="code" >true</code > or <code class="code" >false</code ></p>
<p>(--> <code class="func" >IsDiagonalMatrix</code > (<a href="chapB_mj.html#X7B6420E88418316B" ><span class="RefLink" >B.2-3</span ></a>))</p>
<div class="example" ><pre >
IsDiagonalMatrix := M ->
IsDiagonalMatrix( DecideZero( Eval( M ), HomalgRing( M ) ) ),
</pre ></div >
<p><a id="X7EFC928C7E59CEAE" name="X7EFC928C7E59CEAE" ></a></p>
<h5>D.3-4 ZeroRows</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ ZeroRows</code >( <var class="Arg" >C</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >ZeroRows</code > (<a href="chapB_mj.html#X872B70367F412945" ><span class="RefLink" >B.2-4</span ></a>))</p>
<div class="example" ><pre >
ZeroRows := C -> ZeroRows( DecideZero( Eval( C ), HomalgRing( C ) ) ),
</pre ></div >
<p><a id="X7E78F7D6796C7016" name="X7E78F7D6796C7016" ></a></p>
<h5>D.3-5 ZeroColumns</h5>
<div class="func" ><table class="func" width="100%" ><tr ><td class="tdleft" ><code class="func" >‣ ZeroColumns</code >( <var class="Arg" >C</var > )</td ><td class="tdright" >( function )</td ></tr ></table ></div >
<p>Returns: a <strong class="pkg" >homalg</strong > matrix over the ambient ring</p>
<p>(--> <code class="func" >ZeroColumns</code > (<a href="chapB_mj.html#X7A469E6D7EA63BB6" ><span class="RefLink" >B.2-5</span ></a>))</p>
<div class="example" ><pre >
ZeroColumns := C -> ZeroColumns( DecideZero( Eval( C ), HomalgRing( C ) ) ),
</pre ></div >
<div class="chlinkprevnextbot" > <a href="chap0_mj.html" >[Top of Book]</a> <a href="chap0_mj.html#contents" >[Contents]</a> <a href="chapC_mj.html" >[Previous Chapter]</a> <a href="chapE_mj.html" >[Next Chapter]</a> </div >
<div class="chlinkbot" ><span class="chlink1" >Goto Chapter: </span ><a href="chap0_mj.html" >Top</a> <a href="chap1_mj.html" >1</a> <a href="chap2_mj.html" >2</a> <a href="chap3_mj.html" >3</a> <a href="chap4_mj.html" >4</a> <a href="chap5_mj.html" >5</a> <a href="chap6_mj.html" >6</a> <a href="chapA_mj.html" >A</a> <a href="chapB_mj.html" >B</a> <a href="chapC_mj.html" >C</a> <a href="chapD_mj.html" >D</a> <a href="chapE_mj.html" >E</a> <a href="chapF_mj.html" >F</a> <a href="chapBib_mj.html" >Bib</a> <a href="chapInd_mj.html" >Ind</a> </div >
<hr />
<p class="foot" >generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc " >GAPDoc2HTML</a></p>
</body >
</html >
quality 100%
¤ Dauer der Verarbeitung: 0.30 Sekunden
(vorverarbeitet)
¤
*© Formatika GbR, Deutschland