Skip to content

Commit

Permalink
d&i RingMapOntoSimplifiedResidueClassRingByLinearEquations
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Jun 22, 2024
1 parent 9699020 commit 13a8c64
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
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.06-04",
Version := "2024.06-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
39 changes: 39 additions & 0 deletions MatricesForHomalg/gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -8228,3 +8228,42 @@ InstallMethod( RingMapOntoSimplifiedOnceResidueClassRingByLinearEquations,
return epi;

end );

##
InstallMethod( RingMapOntoSimplifiedResidueClassRingByLinearEquations,
"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 := RingMapOntoSimplifiedOnceResidueClassRingByLinearEquations( 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 ) 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 );

0 comments on commit 13a8c64

Please sign in to comment.