Skip to content

Commit

Permalink
d&i RingMapOntoSimplifiedResidueClassRingUsingLinearEquations
Browse files Browse the repository at this point in the history
and fixed RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations
  • Loading branch information
mohamed-barakat committed Jul 6, 2024
1 parent 4a6bb17 commit ad87350
Show file tree
Hide file tree
Showing 2 changed files with 42 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
41 changes: 41 additions & 0 deletions MatricesForHomalg/gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -8187,6 +8187,8 @@ InstallMethod( RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations,

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

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8190-L8191

Added lines #L8190 - L8191 were not covered by tests
fi;

## R = A / I
Expand Down Expand Up @@ -8228,3 +8230,42 @@ InstallMethod( RingMapOntoSimplifiedOnceResidueClassRingUsingLinearEquations,
return epi;

end );

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

function( R )
local id, pi, psi;

id := RingMap( R );

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8242

Added line #L8242 was not covered by tests

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

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8244-L8246

Added lines #L8244 - L8246 were not covered by tests

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

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8249

Added line #L8249 was not covered by tests

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

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8251-L8252

Added lines #L8251 - L8252 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 8257 in MatricesForHomalg/gap/Tools.gi

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8257

Added line #L8257 was not covered by tests

if HasIsOne( psi ) and IsOne( psi ) then
break;
fi;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8259-L8261

Added lines #L8259 - L8261 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 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

od;

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

return pi;

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

View check run for this annotation

Codecov / codecov/patch

MatricesForHomalg/gap/Tools.gi#L8269

Added line #L8269 was not covered by tests

end );

0 comments on commit ad87350

Please sign in to comment.