Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed RingMapOnto* methods #613

Merged
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
2 changes: 1 addition & 1 deletion MatricesForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(

PackageName := "MatricesForHomalg",
Subtitle := "Matrices for the homalg project",
Version := "2024.08-04",
Version := "2024.08-05",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down
36 changes: 26 additions & 10 deletions MatricesForHomalg/gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -8015,7 +8015,7 @@
fi;

## R = A / I
I := MatrixOfRelations( R );
I := BasisOfRows( MatrixOfRelations( R ) );

Check warning on line 8018 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8018

Added line #L8018 was not covered by tests

A := AmbientRing( R );

Expand Down Expand Up @@ -8047,7 +8047,9 @@
zero_rows := ZeroRows( matrix - images );

## create the standard subring S of A, i.e., the subring generated by the standard indeterminates
if Length( indets ) = Length( zero_rows ) and
if IsZero( DecideZeroRows( HomalgIdentityMatrix( 1, A ), I ) ) then
S := k / One( k );
elif Length( indets ) = Length( zero_rows ) and

Check warning on line 8052 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8050-L8052

Added lines #L8050 - L8052 were not covered by tests
IsIdenticalObj( k, CoefficientsRing( A ) ) then
S := A;
else
Expand Down Expand Up @@ -8091,8 +8093,22 @@
fi;

## R = A / I
A := AmbientRing( R );

Check warning on line 8096 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8096

Added line #L8096 was not covered by tests

I := MatrixOfRelations( R );

## [ y_1, ..., y_{i-1}, y_i, y_{i+1}, ..., y_s ]
indets := ShallowCopy( Indeterminates( A ) );

Check warning on line 8101 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8101

Added line #L8101 was not covered by tests

if IsEmpty( indets ) and IsZero( DecideZeroRows( HomalgIdentityMatrix( 1, A ), I ) ) then
S := CoefficientsRing( A ) / 1;
SetIsZero( S, true );
epi := RingMap( ListWithIdenticalEntries( Length( indets ), Zero( S ) ), A, S );
SetIsMorphism( epi, true );
SetIsEpimorphism( epi, true );
return epi;
fi;

Check warning on line 8110 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8103-L8110

Added lines #L8103 - L8110 were not covered by tests

for i in [ 1 .. NumberRows( I ) ] do
## [ j, f/u ] where (u y_j - f) ∈ GB(I)
img := IsolateIndeterminate( I[ i, 1 ] );
Expand All @@ -8102,14 +8118,12 @@
od;

if img = fail then
return id;
epi := RingMap( List( indets, a -> a / R ), A, R );
SetIsMorphism( epi, true );
SetIsEpimorphism( epi, true );
return epi;

Check warning on line 8124 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8121-L8124

Added lines #L8121 - L8124 were not covered by tests
fi;

A := AmbientRing( R );

## [ y_1, ..., y_{i-1}, y_i, y_{i+1}, ..., y_s ]
indets := ShallowCopy( Indeterminates( A ) );

new_indets := List( indets, String );

## [ y_1, ..., y_{i-1}, y_{i+1}, ..., y_s ]
Expand Down Expand Up @@ -8159,7 +8173,8 @@
## construct the surjective morphism psi: A_i -> A_{i+1} / I_{i+1} =: R_{i+1}
psi := RingMapOntoSimplifiedOnceResidueClassRing( Range( pi ) );

if HasIsOne( psi ) and IsOne( psi ) then
if ( HasIsZero( Range( psi ) ) and IsZero( Range( psi ) ) ) or
Length( Indeterminates( Source( psi ) ) ) = Length( Indeterminates( Range( psi ) ) ) then

Check warning on line 8177 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8176-L8177

Added lines #L8176 - L8177 were not covered by tests
break;
fi;

Expand Down Expand Up @@ -8254,7 +8269,8 @@
## construct the surjective morphism psi: A_i -> A_{i+1} / I_{i+1} =: R_{i+1}
psi := RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations( Range( pi ) );

if ( HasIsOne( psi ) and IsOne( psi ) ) or ( HasIsZero( Range( psi ) ) and IsZero( Range( psi ) ) ) then
if ( HasIsZero( Range( psi ) ) and IsZero( Range( psi ) ) ) or
Length( Indeterminates( Source( psi ) ) ) = Length( Indeterminates( Range( psi ) ) ) then

Check warning on line 8273 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8272-L8273

Added lines #L8272 - L8273 were not covered by tests
break;
fi;

Expand Down
Loading