############################################################################# ## ## MatricesForHomalg.gi MatricesForHomalg package ## ## Copyright 2007-2012, Mohamed Barakat, University of Kaiserslautern ## Markus Lange-Hegermann, RWTH-Aachen University ## ## Implementations for MatricesForHomalg. ## ############################################################################# #################################### # # representations: # #################################### #################################### # # families and types: # #################################### #################################### # # global variables: # #################################### # a central place for configuration variables: InstallValue( HOMALG_MATRICES, rec( OtherInternalMatrixTypes := [ ], colors := rec( ## (B)asic (O)perations: BOE := "\033[1;37;40m", ## reduced (E)chelon form: RowReducedEchelonForm/Columns BOB := "\033[1;37;45m", ## (B)asis: BasisOfRow/ColumnModule BOC := "\033[1;37;45m", ## Basis: BasisOfRows/Columns(C)oeff BOD := "\033[1;37;42m", ## existence of a particular solution: (D)ecideZeroRows/Columns BOP := "\033[1;37;42m", ## (P)articular solution: DecideZeroRows/Columns(Effectively) BOH := "\033[1;37;41m", ## solutions of the (H)omogeneous system: SyzygiesGeneratorsOfRows/Columns busy := "\033[01m\033[4;31;40m", done := "\033[01m\033[4;32;40m", ), matrix_logic_infolevels := [ InfoCOLEM, InfoLIMAT ], color_display := false, PreferDenseMatrices := false, ByASmallerPresentationDoesNotDecideZero := false, Intersect_uses_ReducedBasisOfModule := true, SubQuotient_uses_Intersect := false, MaximumNumberOfResolutionSteps := 1001, RandomSource := GlobalMersenneTwister, ) ); #################################### # # global functions: # #################################### ## <#GAPDoc Label="homalgMode"> ## ## ## ## This function sets different modes which influence how much of the basic matrix operations and ## the logical matrix methods become visible (&see; Appendices , ). ## Handling the string str is not case-sensitive. ## If a second string str2 is given, then homalgMode( str2 ) is invoked at the end. ## In case you let &homalg; delegate matrix operations to an external system the you might also want to ## check homalgIOMode in the &HomalgToCAS; package manual. ## ## ## str ## str (long form) ## mode description ## ## ## ## ## "" ## "" ## the default mode, i.e. the computation protocol won't be visible ## ## ## ## ## (homalgMode( ) is a short form for homalgMode( "" )) ## ## ## ## "b" ## "basic" ## make the basic matrix operations visible + homalgMode( "logic" ) ## ## ## ## "d" ## "debug" ## same as "basic" but also makes Row/ColumnReducedEchelonForm visible ## ## ## ## "l" ## "logic" ## make the logical methods in &LIMAT; and &COLEM; visible ## ## ## ##
## All modes other than the "default"-mode only set their specific values and leave ## the other values untouched, which allows combining them to some extent. This also means that ## in order to get from one mode to a new mode (without the aim to combine them) ## one needs to reset to the "default"-mode first. This can be done using homalgMode( "", new_mode ); ## 1 and IsString( arg[2] ) then homalgMode( arg[2] ); fi; end ); ## ]]> ##
##
## <#/GAPDoc> InstallGlobalFunction( FFEToString, function( f, p, d, z ) local e; if IsZero( f ) then return "0"; elif IsOne( f ) then return "1"; fi; e := LogFFE( f, Z(p^d) ); if e = 1 then return z; fi; return Concatenation( z, "^", String( e ) ); end );