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

d&i RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations #612

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-01",
Version := "2024.08-04",
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
5 changes: 4 additions & 1 deletion MatricesForHomalg/gap/Tools.gd
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ DeclareOperation( "RingMapOntoSimplifiedOnceResidueClassRing",
DeclareOperation( "RingMapOntoSimplifiedResidueClassRing",
[ IsHomalgRing ] );

DeclareOperation( "RingMapOntoSimplifiedResidueClassRingByLinearEquations",
DeclareOperation( "RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations",
[ IsHomalgRing ] );

DeclareOperation( "RingMapOntoSimplifiedResidueClassRingUsingLinearEquations",
[ IsHomalgRing ] );

## This is a dummy declaration for a function actually installed
Expand Down
58 changes: 49 additions & 9 deletions MatricesForHomalg/gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -8155,14 +8155,13 @@
pi := RingMapOntoRewrittenResidueClassRing( R ); # replace pi: A -> R = A / I by pi: A -> R_1 := A_1 / I_1

while true do

## 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
break;
fi;


## compose A -pi-> A_i / I_i -psi-> A_{i+1} / I_{i+1},
## where we understand the above psi as the isomorphism psi: A_i / I_i -psi-> A_{i+1} / I_{i+1}
Expand All @@ -8175,7 +8174,7 @@
end );

##
InstallMethod( RingMapOntoSimplifiedResidueClassRingByLinearEquations,
InstallMethod( RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations,
"for a homalg ring",
[ IsHomalgRing ],

Expand All @@ -8186,30 +8185,32 @@

if not HasAmbientRing( R ) then
return id;
elif HasIsZero( R ) and IsZero( R ) then
return id;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8188-L8189

Added lines #L8188 - L8189 were not covered by tests
fi;

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

L := Filtered( EntriesOfHomalgMatrix( I ), e -> Degree( e ) = 1 );

if L = [ ] then
return id;
fi;
L := Filtered( EntriesOfHomalgMatrix( I ), e -> Degree( e ) <= 1 );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8195

Added line #L8195 was not covered by tests

A := AmbientRing( R );

L := HomalgMatrix( L, Length( L ), 1, A );

L := BasisOfRows( L );

if IsZero( L ) then
return id;
fi;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8203-L8205

Added lines #L8203 - L8205 were not covered by tests

S := A / L;

pi := RingMapOntoSimplifiedResidueClassRing( S );

P := Range( pi );

Assert( 0, not HasAmbientRing( P ) );
Assert( 0, ( HasIsZero( P ) and IsZero( P ) ) or not HasAmbientRing( P ) );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8213

Added line #L8213 was not covered by tests

J := Pullback( pi, I );

Expand All @@ -8227,3 +8228,42 @@
return epi;

end );

##
InstallMethod( RingMapOntoSimplifiedResidueClassRingUsingLinearEquations,
"for a homalg ring",
[ IsHomalgRing ],

function( R )
local id, pi, psi;

id := RingMap( R );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8240

Added line #L8240 was not covered by tests

if not HasAmbientRing( R ) then
return id;
fi;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8242-L8244

Added lines #L8242 - L8244 were not covered by tests

# R = A / I
pi := RingMap( Indeterminates( R ), AmbientRing( R ), R );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8247

Added line #L8247 was not covered by tests

SetIsMorphism( pi, true );
SetIsEpimorphism( pi, true );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8249-L8250

Added lines #L8249 - L8250 were not covered by tests

while true do

## construct the surjective morphism psi: A_i -> A_{i+1} / I_{i+1} =: R_{i+1}
psi := RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations( Range( pi ) );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8255

Added line #L8255 was not covered by tests

if ( HasIsOne( psi ) and IsOne( psi ) ) or ( HasIsZero( Range( psi ) ) and IsZero( Range( psi ) ) ) then
break;
fi;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8257-L8259

Added lines #L8257 - L8259 were not covered by tests

## compose A -pi-> A_i / I_i -psi-> A_{i+1} / I_{i+1},
## where we understand the above psi as the isomorphism psi: A_i / I_i -psi-> A_{i+1} / I_{i+1}
pi := PreCompose( pi, psi );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8263

Added line #L8263 was not covered by tests

od;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8265

Added line #L8265 was not covered by tests

return pi;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8267

Added line #L8267 was not covered by tests

end );
Loading