From ef832ab5f14cbafa75aa211c9471c3d9fc6e3609 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 1 Aug 2022 18:09:19 +0200 Subject: [PATCH] Avoid using InstallValue For some background, see https://github.com/gap-system/gap/issues/1637 --- 4ti2Interface/gap/4ti2Interface.gd | 2 - 4ti2Interface/gap/4ti2Interface.gi | 2 +- ExamplesForHomalg/gap/ExamplesForHomalg.gd | 3 -- ExamplesForHomalg/gap/ExamplesForHomalg.gi | 2 +- RingsForHomalg/doc/_main.xml | 58 ++++++++++++++++++++++ RingsForHomalg/gap/GAPHomalg.gd | 10 ---- RingsForHomalg/gap/GAPHomalg.gi | 4 +- RingsForHomalg/gap/GAPHomalgBasic.gd | 9 ---- RingsForHomalg/gap/GAPHomalgBasic.gi | 2 +- RingsForHomalg/gap/GAPHomalgBestBasis.gd | 9 ---- RingsForHomalg/gap/GAPHomalgBestBasis.gi | 2 +- RingsForHomalg/gap/GAPHomalgTools.gd | 9 ---- RingsForHomalg/gap/GAPHomalgTools.gi | 2 +- RingsForHomalg/gap/MAGMA.gd | 10 ---- RingsForHomalg/gap/MAGMA.gi | 4 +- RingsForHomalg/gap/MAGMABasic.gd | 9 ---- RingsForHomalg/gap/MAGMABasic.gi | 2 +- RingsForHomalg/gap/MAGMABestBasis.gd | 9 ---- RingsForHomalg/gap/MAGMABestBasis.gi | 2 +- RingsForHomalg/gap/MAGMATools.gd | 9 ---- RingsForHomalg/gap/MAGMATools.gi | 2 +- RingsForHomalg/gap/Macaulay2.gd | 10 ---- RingsForHomalg/gap/Macaulay2.gi | 4 +- RingsForHomalg/gap/Macaulay2Basic.gd | 9 ---- RingsForHomalg/gap/Macaulay2Basic.gi | 2 +- RingsForHomalg/gap/Macaulay2Tools.gd | 9 ---- RingsForHomalg/gap/Macaulay2Tools.gi | 2 +- RingsForHomalg/gap/MapleHomalg.gd | 10 ---- RingsForHomalg/gap/MapleHomalg.gi | 4 +- RingsForHomalg/gap/MapleHomalgBasic.gd | 8 --- RingsForHomalg/gap/MapleHomalgBasic.gi | 2 +- RingsForHomalg/gap/MapleHomalgBestBasis.gd | 9 ---- RingsForHomalg/gap/MapleHomalgBestBasis.gi | 2 +- RingsForHomalg/gap/MapleHomalgTools.gd | 9 ---- RingsForHomalg/gap/MapleHomalgTools.gi | 2 +- RingsForHomalg/gap/Oscar.gd | 10 ---- RingsForHomalg/gap/Oscar.gi | 4 +- RingsForHomalg/gap/OscarBasic.gd | 8 --- RingsForHomalg/gap/OscarBasic.gi | 2 +- RingsForHomalg/gap/OscarTools.gd | 8 --- RingsForHomalg/gap/OscarTools.gi | 2 +- RingsForHomalg/gap/RingsForHomalg.gd | 3 -- RingsForHomalg/gap/RingsForHomalg.gi | 2 +- RingsForHomalg/gap/Sage.gd | 2 - RingsForHomalg/gap/Sage.gi | 2 +- RingsForHomalg/gap/SageBasic.gd | 9 ---- RingsForHomalg/gap/SageBasic.gi | 2 +- RingsForHomalg/gap/SageBestBasis.gd | 9 ---- RingsForHomalg/gap/SageBestBasis.gi | 2 +- RingsForHomalg/gap/SageTools.gd | 9 ---- RingsForHomalg/gap/SageTools.gi | 2 +- RingsForHomalg/gap/Singular.gd | 10 ---- RingsForHomalg/gap/Singular.gi | 4 +- RingsForHomalg/gap/SingularBasic.gd | 9 ---- RingsForHomalg/gap/SingularBasic.gi | 2 +- RingsForHomalg/gap/SingularBestBasis.gd | 9 ---- RingsForHomalg/gap/SingularBestBasis.gi | 2 +- RingsForHomalg/gap/SingularTools.gd | 9 ---- RingsForHomalg/gap/SingularTools.gi | 2 +- RingsForHomalg/read.g | 18 +++---- 60 files changed, 102 insertions(+), 282 deletions(-) create mode 100644 RingsForHomalg/doc/_main.xml diff --git a/4ti2Interface/gap/4ti2Interface.gd b/4ti2Interface/gap/4ti2Interface.gd index d6473e118..1ce35ec17 100644 --- a/4ti2Interface/gap/4ti2Interface.gd +++ b/4ti2Interface/gap/4ti2Interface.gd @@ -27,8 +27,6 @@ #! Copy it in your GAP pkg-directory. #! After this, the package can be loaded via LoadPackage( "4ti2Interface" ); -DeclareGlobalVariable( "4ti2Interface_BINARIES" ); - #! @Chapter 4ti2 functions #! @Section Groebner diff --git a/4ti2Interface/gap/4ti2Interface.gi b/4ti2Interface/gap/4ti2Interface.gi index b039c91fd..46ffacb98 100644 --- a/4ti2Interface/gap/4ti2Interface.gi +++ b/4ti2Interface/gap/4ti2Interface.gi @@ -8,7 +8,7 @@ ## ############################################################################# -InstallValue( 4ti2Interface_BINARIES, +BindGlobal( "4ti2Interface_BINARIES", rec( required_binaries := [ "groebner", "hilbert", "zsolve", "graver" ], ) ); diff --git a/ExamplesForHomalg/gap/ExamplesForHomalg.gd b/ExamplesForHomalg/gap/ExamplesForHomalg.gd index b96857616..4385a4ffe 100644 --- a/ExamplesForHomalg/gap/ExamplesForHomalg.gd +++ b/ExamplesForHomalg/gap/ExamplesForHomalg.gd @@ -15,9 +15,6 @@ DeclareInfoClass( "InfoExamplesForHomalg" ); SetInfoLevel( InfoExamplesForHomalg, 1 ); -# a central place for configurations: -DeclareGlobalVariable( "HOMALG_EXAMPLES" ); - #################################### # # global functions and operations: diff --git a/ExamplesForHomalg/gap/ExamplesForHomalg.gi b/ExamplesForHomalg/gap/ExamplesForHomalg.gi index 4030dbdc6..9de209e2b 100644 --- a/ExamplesForHomalg/gap/ExamplesForHomalg.gi +++ b/ExamplesForHomalg/gap/ExamplesForHomalg.gi @@ -18,7 +18,7 @@ # a central place for configuration variables: -InstallValue( HOMALG_EXAMPLES, +BindGlobal( "HOMALG_EXAMPLES", rec( OwnRingOrReadFile := 1 ) diff --git a/RingsForHomalg/doc/_main.xml b/RingsForHomalg/doc/_main.xml new file mode 100644 index 000000000..44422fff2 --- /dev/null +++ b/RingsForHomalg/doc/_main.xml @@ -0,0 +1,58 @@ + + + + +alexander'> +$\to$-->'> +GAP4'> +Maple'> +Mathematica'> +Singular'> +Plural'> +Sage'> +python'> +cython'> +C'> +MAGMA'> +Macaulay2'> +IO'> +MatricesForHomalg'> +homalg'> +Modules'> +ResidueClassRingForHomalg'> +LIRNG'> +LIMAP'> +LIMAT'> +COLEM'> +LIOBJ'> +LIMOR'> +LICPX'> +ExamplesForHomalg'> +Gauss'> +GaussForHomalg'> +HomalgToCAS'> +IO_ForHomalg'> +MapleForHomalg'> +RingsForHomalg'> +LessGenerators'> +Yoneda'> +Sheaves'> +SCO'> +LocalizeRingForHomalg'> +GAPDoc'> +LIMOD'> +] +> + +<#Include SYSTEM "title.xml"> + + +<#Include SYSTEM "intro.xml"> +<#Include SYSTEM "install.xml"> +<#Include SYSTEM "ringtable.xml"> + + + + diff --git a/RingsForHomalg/gap/GAPHomalg.gd b/RingsForHomalg/gap/GAPHomalg.gd index 3bffa8aa9..021491812 100644 --- a/RingsForHomalg/gap/GAPHomalg.gd +++ b/RingsForHomalg/gap/GAPHomalg.gd @@ -8,16 +8,6 @@ ## ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "HOMALG_IO_GAP" ); - -DeclareGlobalVariable( "GAPHomalgMacros" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/GAPHomalg.gi b/RingsForHomalg/gap/GAPHomalg.gi index 783f87e1a..9bfd68f66 100644 --- a/RingsForHomalg/gap/GAPHomalg.gi +++ b/RingsForHomalg/gap/GAPHomalg.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( HOMALG_IO_GAP, +BindGlobal( "HOMALG_IO_GAP", rec( cas := "gap", ## normalized name on which the user should have no control name := "GAP", @@ -76,7 +76,7 @@ InstallGlobalFunction( _ExternalGAP_multiple_delete, end ); ## -InstallValue( GAPHomalgMacros, +BindGlobal( "GAPHomalgMacros", rec( ) diff --git a/RingsForHomalg/gap/GAPHomalgBasic.gd b/RingsForHomalg/gap/GAPHomalgBasic.gd index 31fef392e..25ed1eda7 100644 --- a/RingsForHomalg/gap/GAPHomalgBasic.gd +++ b/RingsForHomalg/gap/GAPHomalgBasic.gd @@ -7,12 +7,3 @@ ## Declarations for the external rings provided by the GAP package homalg. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForGAPHomalgBasic" ); - diff --git a/RingsForHomalg/gap/GAPHomalgBasic.gi b/RingsForHomalg/gap/GAPHomalgBasic.gi index 561adaed9..bac2a1ecb 100644 --- a/RingsForHomalg/gap/GAPHomalgBasic.gi +++ b/RingsForHomalg/gap/GAPHomalgBasic.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForGAPHomalgBasic, +BindGlobal( "CommonHomalgTableForGAPHomalgBasic", rec( ## Must only then be provided by the RingPackage in case the default diff --git a/RingsForHomalg/gap/GAPHomalgBestBasis.gd b/RingsForHomalg/gap/GAPHomalgBestBasis.gd index 27a2e270d..75380db8f 100644 --- a/RingsForHomalg/gap/GAPHomalgBestBasis.gd +++ b/RingsForHomalg/gap/GAPHomalgBestBasis.gd @@ -8,12 +8,3 @@ ## of the GAP implementation of homalg. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForGAPHomalgBestBasis" ); - diff --git a/RingsForHomalg/gap/GAPHomalgBestBasis.gi b/RingsForHomalg/gap/GAPHomalgBestBasis.gi index d4f1167b6..af0132bdc 100644 --- a/RingsForHomalg/gap/GAPHomalgBestBasis.gi +++ b/RingsForHomalg/gap/GAPHomalgBestBasis.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForGAPHomalgBestBasis, +BindGlobal( "CommonHomalgTableForGAPHomalgBestBasis", rec( ## Can optionally be provided by the RingPackage diff --git a/RingsForHomalg/gap/GAPHomalgTools.gd b/RingsForHomalg/gap/GAPHomalgTools.gd index f2e23efd8..dbedec8c7 100644 --- a/RingsForHomalg/gap/GAPHomalgTools.gd +++ b/RingsForHomalg/gap/GAPHomalgTools.gd @@ -8,12 +8,3 @@ ## of the Maple implementation of homalg. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForGAPHomalgTools" ); - diff --git a/RingsForHomalg/gap/GAPHomalgTools.gi b/RingsForHomalg/gap/GAPHomalgTools.gi index 7e7259080..68a1bdacb 100644 --- a/RingsForHomalg/gap/GAPHomalgTools.gi +++ b/RingsForHomalg/gap/GAPHomalgTools.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForGAPHomalgTools, +BindGlobal( "CommonHomalgTableForGAPHomalgTools", rec( Zero := HomalgExternalRingElement( R -> homalgSendBlocking( [ "Zero( ", R, " )" ], "Zero" ), "GAP", IsZero ), diff --git a/RingsForHomalg/gap/MAGMA.gd b/RingsForHomalg/gap/MAGMA.gd index 57124d9a2..58d4f2440 100644 --- a/RingsForHomalg/gap/MAGMA.gd +++ b/RingsForHomalg/gap/MAGMA.gd @@ -9,16 +9,6 @@ ## ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "HOMALG_IO_MAGMA" ); - -DeclareGlobalVariable( "MAGMAMacros" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/MAGMA.gi b/RingsForHomalg/gap/MAGMA.gi index 9b7bd28a4..d654830c0 100644 --- a/RingsForHomalg/gap/MAGMA.gi +++ b/RingsForHomalg/gap/MAGMA.gi @@ -16,7 +16,7 @@ # #################################### -InstallValue( HOMALG_IO_MAGMA, +BindGlobal( "HOMALG_IO_MAGMA", rec( cas := "magma", ## normalized name on which the user should have no control name := "MAGMA", @@ -131,7 +131,7 @@ InstallGlobalFunction( _MAGMA_multiple_delete, end ); ## -InstallValue( MAGMAMacros, +BindGlobal( "MAGMAMacros", rec( _order := [ diff --git a/RingsForHomalg/gap/MAGMABasic.gd b/RingsForHomalg/gap/MAGMABasic.gd index c37bcac74..363f0bf62 100644 --- a/RingsForHomalg/gap/MAGMABasic.gd +++ b/RingsForHomalg/gap/MAGMABasic.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided by MAGMA. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMAGMABasic" ); - diff --git a/RingsForHomalg/gap/MAGMABasic.gi b/RingsForHomalg/gap/MAGMABasic.gi index 34cf5d5f3..cb22a3fd3 100644 --- a/RingsForHomalg/gap/MAGMABasic.gi +++ b/RingsForHomalg/gap/MAGMABasic.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForMAGMABasic, +BindGlobal( "CommonHomalgTableForMAGMABasic", rec( ## Must only then be provided by the RingPackage in case the default diff --git a/RingsForHomalg/gap/MAGMABestBasis.gd b/RingsForHomalg/gap/MAGMABestBasis.gd index b5406d93d..1d6880cff 100644 --- a/RingsForHomalg/gap/MAGMABestBasis.gd +++ b/RingsForHomalg/gap/MAGMABestBasis.gd @@ -7,12 +7,3 @@ ## Declarations for the rings with BestBasis provided by MAGMA. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMAGMABestBasis" ); - diff --git a/RingsForHomalg/gap/MAGMABestBasis.gi b/RingsForHomalg/gap/MAGMABestBasis.gi index 6c82afa49..c314fa4a0 100644 --- a/RingsForHomalg/gap/MAGMABestBasis.gi +++ b/RingsForHomalg/gap/MAGMABestBasis.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForMAGMABestBasis, +BindGlobal( "CommonHomalgTableForMAGMABestBasis", rec( ## Can optionally be provided by the RingPackage diff --git a/RingsForHomalg/gap/MAGMATools.gd b/RingsForHomalg/gap/MAGMATools.gd index 172c14f09..e888e4128 100644 --- a/RingsForHomalg/gap/MAGMATools.gd +++ b/RingsForHomalg/gap/MAGMATools.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided by MAGMA. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMAGMATools" ); - diff --git a/RingsForHomalg/gap/MAGMATools.gi b/RingsForHomalg/gap/MAGMATools.gi index 633eb32ec..79274488c 100644 --- a/RingsForHomalg/gap/MAGMATools.gi +++ b/RingsForHomalg/gap/MAGMATools.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForMAGMATools, +BindGlobal( "CommonHomalgTableForMAGMATools", rec( Zero := HomalgExternalRingElement( R -> homalgSendBlocking( [ "Zero(", R, ")" ], "Zero" ), "MAGMA", IsZero ), diff --git a/RingsForHomalg/gap/Macaulay2.gd b/RingsForHomalg/gap/Macaulay2.gd index 7fc02aeeb..6ff719824 100644 --- a/RingsForHomalg/gap/Macaulay2.gd +++ b/RingsForHomalg/gap/Macaulay2.gd @@ -8,16 +8,6 @@ ## ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "HOMALG_IO_Macaulay2" ); - -DeclareGlobalVariable( "Macaulay2Macros" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/Macaulay2.gi b/RingsForHomalg/gap/Macaulay2.gi index c720e77ad..7bc6df002 100644 --- a/RingsForHomalg/gap/Macaulay2.gi +++ b/RingsForHomalg/gap/Macaulay2.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( HOMALG_IO_Macaulay2, +BindGlobal( "HOMALG_IO_Macaulay2", rec( cas := "macaulay2", ## normalized name on which the user should have no control name := "Macaulay2", @@ -99,7 +99,7 @@ InstallGlobalFunction( _Macaulay2_SetInvolution, end ); ## -InstallValue( Macaulay2Macros, +BindGlobal( "Macaulay2Macros", rec( IsIdentityMatrix := "\n\ diff --git a/RingsForHomalg/gap/Macaulay2Basic.gd b/RingsForHomalg/gap/Macaulay2Basic.gd index 971fa1c31..e0a40f21c 100644 --- a/RingsForHomalg/gap/Macaulay2Basic.gd +++ b/RingsForHomalg/gap/Macaulay2Basic.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided by Macaulay2. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMacaulay2Basic" ); - diff --git a/RingsForHomalg/gap/Macaulay2Basic.gi b/RingsForHomalg/gap/Macaulay2Basic.gi index cb3d6ee39..e26f4e0b2 100644 --- a/RingsForHomalg/gap/Macaulay2Basic.gi +++ b/RingsForHomalg/gap/Macaulay2Basic.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForMacaulay2Basic, +BindGlobal( "CommonHomalgTableForMacaulay2Basic", rec( ## Must only then be provided by the RingPackage in case the default diff --git a/RingsForHomalg/gap/Macaulay2Tools.gd b/RingsForHomalg/gap/Macaulay2Tools.gd index a4faf54f5..648af15cf 100644 --- a/RingsForHomalg/gap/Macaulay2Tools.gd +++ b/RingsForHomalg/gap/Macaulay2Tools.gd @@ -8,12 +8,3 @@ ## of the Maple implementation of homalg. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMacaulay2Tools" ); - diff --git a/RingsForHomalg/gap/Macaulay2Tools.gi b/RingsForHomalg/gap/Macaulay2Tools.gi index e50fbc664..8fbc09f3b 100644 --- a/RingsForHomalg/gap/Macaulay2Tools.gi +++ b/RingsForHomalg/gap/Macaulay2Tools.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForMacaulay2Tools, +BindGlobal( "CommonHomalgTableForMacaulay2Tools", rec( Zero := HomalgExternalRingElement( R -> homalgSendBlocking( [ R, "#0" ], "Zero" ), "Macaulay2", IsZero ), diff --git a/RingsForHomalg/gap/MapleHomalg.gd b/RingsForHomalg/gap/MapleHomalg.gd index bc0a2745b..0f28168a6 100644 --- a/RingsForHomalg/gap/MapleHomalg.gd +++ b/RingsForHomalg/gap/MapleHomalg.gd @@ -8,16 +8,6 @@ ## ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "HOMALG_IO_Maple" ); - -DeclareGlobalVariable( "MapleMacros" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/MapleHomalg.gi b/RingsForHomalg/gap/MapleHomalg.gi index 6e71bf38c..768a044e3 100644 --- a/RingsForHomalg/gap/MapleHomalg.gi +++ b/RingsForHomalg/gap/MapleHomalg.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( HOMALG_IO_Maple, +BindGlobal( "HOMALG_IO_Maple", rec( cas := "maple", ## normalized name on which the user should have no control name := "Maple", @@ -152,7 +152,7 @@ InstallGlobalFunction( _Maple_multiple_delete, end ); ## -InstallValue( MapleMacros, +BindGlobal( "MapleMacros", rec( Eliminate := "\n\ diff --git a/RingsForHomalg/gap/MapleHomalgBasic.gd b/RingsForHomalg/gap/MapleHomalgBasic.gd index 2bc552380..760d80ac8 100644 --- a/RingsForHomalg/gap/MapleHomalgBasic.gd +++ b/RingsForHomalg/gap/MapleHomalgBasic.gd @@ -9,11 +9,3 @@ ## ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMapleHomalgBasic" ); - diff --git a/RingsForHomalg/gap/MapleHomalgBasic.gi b/RingsForHomalg/gap/MapleHomalgBasic.gi index cc11b0059..9725c2c28 100644 --- a/RingsForHomalg/gap/MapleHomalgBasic.gi +++ b/RingsForHomalg/gap/MapleHomalgBasic.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForMapleHomalgBasic, +BindGlobal( "CommonHomalgTableForMapleHomalgBasic", rec( ## Must only then be provided by the RingPackage in case the default diff --git a/RingsForHomalg/gap/MapleHomalgBestBasis.gd b/RingsForHomalg/gap/MapleHomalgBestBasis.gd index 1abea847f..6536fc6a0 100644 --- a/RingsForHomalg/gap/MapleHomalgBestBasis.gd +++ b/RingsForHomalg/gap/MapleHomalgBestBasis.gd @@ -8,12 +8,3 @@ ## of the Maple implementation of homalg. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMapleHomalgBestBasis" ); - diff --git a/RingsForHomalg/gap/MapleHomalgBestBasis.gi b/RingsForHomalg/gap/MapleHomalgBestBasis.gi index 0819741f9..fc520d6cb 100644 --- a/RingsForHomalg/gap/MapleHomalgBestBasis.gi +++ b/RingsForHomalg/gap/MapleHomalgBestBasis.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForMapleHomalgBestBasis, +BindGlobal( "CommonHomalgTableForMapleHomalgBestBasis", rec( ## Can optionally be provided by the RingPackage diff --git a/RingsForHomalg/gap/MapleHomalgTools.gd b/RingsForHomalg/gap/MapleHomalgTools.gd index e53324626..2cd0b9060 100644 --- a/RingsForHomalg/gap/MapleHomalgTools.gd +++ b/RingsForHomalg/gap/MapleHomalgTools.gd @@ -8,12 +8,3 @@ ## of the Maple implementation of homalg. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForMapleHomalgTools" ); - diff --git a/RingsForHomalg/gap/MapleHomalgTools.gi b/RingsForHomalg/gap/MapleHomalgTools.gi index 1690b6e76..7daec8732 100644 --- a/RingsForHomalg/gap/MapleHomalgTools.gi +++ b/RingsForHomalg/gap/MapleHomalgTools.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForMapleHomalgTools, +BindGlobal( "CommonHomalgTableForMapleHomalgTools", rec( Zero := HomalgExternalRingElement( function( R ) homalgSendBlocking( [ "`homalg/homalg_options`(", R, "[-1])" ], "need_command", "initialize" ); diff --git a/RingsForHomalg/gap/Oscar.gd b/RingsForHomalg/gap/Oscar.gd index 350d202bc..6c9bfb6c8 100644 --- a/RingsForHomalg/gap/Oscar.gd +++ b/RingsForHomalg/gap/Oscar.gd @@ -14,16 +14,6 @@ # dummy_variable to emulate Q by Q[dummy_variable] ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "HOMALG_IO_Oscar" ); - -DeclareGlobalVariable( "OscarMacros" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/Oscar.gi b/RingsForHomalg/gap/Oscar.gi index 6d416adb2..912e1c202 100644 --- a/RingsForHomalg/gap/Oscar.gi +++ b/RingsForHomalg/gap/Oscar.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( HOMALG_IO_Oscar, +BindGlobal( "HOMALG_IO_Oscar", rec( cas := "oscar", ## normalized name on which the user should have no control name := "Oscar", @@ -128,7 +128,7 @@ InstallGlobalFunction( _Oscar_multiple_delete, end ); ## -InstallValue( OscarMacros, +BindGlobal( "OscarMacros", rec( init := """ diff --git a/RingsForHomalg/gap/OscarBasic.gd b/RingsForHomalg/gap/OscarBasic.gd index a3298dcdc..e69de29bb 100644 --- a/RingsForHomalg/gap/OscarBasic.gd +++ b/RingsForHomalg/gap/OscarBasic.gd @@ -1,8 +0,0 @@ -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForOscarBasic" ); - diff --git a/RingsForHomalg/gap/OscarBasic.gi b/RingsForHomalg/gap/OscarBasic.gi index 1ddaeb78e..8e02ff5e9 100644 --- a/RingsForHomalg/gap/OscarBasic.gi +++ b/RingsForHomalg/gap/OscarBasic.gi @@ -4,7 +4,7 @@ # #################################### -InstallValue( CommonHomalgTableForOscarBasic, +BindGlobal( "CommonHomalgTableForOscarBasic", rec( ## Must only then be provided by the RingPackage in case the default diff --git a/RingsForHomalg/gap/OscarTools.gd b/RingsForHomalg/gap/OscarTools.gd index ddf33d595..e69de29bb 100644 --- a/RingsForHomalg/gap/OscarTools.gd +++ b/RingsForHomalg/gap/OscarTools.gd @@ -1,8 +0,0 @@ -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForOscarTools" ); - diff --git a/RingsForHomalg/gap/OscarTools.gi b/RingsForHomalg/gap/OscarTools.gi index 51d3af838..401342a3c 100644 --- a/RingsForHomalg/gap/OscarTools.gi +++ b/RingsForHomalg/gap/OscarTools.gi @@ -4,7 +4,7 @@ # #################################### -InstallValue( CommonHomalgTableForOscarTools, +BindGlobal( "CommonHomalgTableForOscarTools", rec( Zero := HomalgExternalRingElement( R -> homalgSendBlocking( [ R, "(0)" ], R, "Zero" ), "Oscar", IsZero ), diff --git a/RingsForHomalg/gap/RingsForHomalg.gd b/RingsForHomalg/gap/RingsForHomalg.gd index dd8ef979c..c82e7bda9 100644 --- a/RingsForHomalg/gap/RingsForHomalg.gd +++ b/RingsForHomalg/gap/RingsForHomalg.gd @@ -13,9 +13,6 @@ DeclareInfoClass( "InfoRingsForHomalg" ); SetInfoLevel( InfoRingsForHomalg, 1 ); -# a central place for configurations: -DeclareGlobalVariable( "HOMALG_RINGS" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/RingsForHomalg.gi b/RingsForHomalg/gap/RingsForHomalg.gi index 7d13c27e1..8b5ce46d9 100644 --- a/RingsForHomalg/gap/RingsForHomalg.gi +++ b/RingsForHomalg/gap/RingsForHomalg.gi @@ -17,7 +17,7 @@ # a central place for configuration variables: ## -InstallValue( HOMALG_RINGS, +BindGlobal( "HOMALG_RINGS", rec( RingOfIntegersDefaultCAS := "Singular", FieldOfRationalsDefaultCAS := "Singular", diff --git a/RingsForHomalg/gap/Sage.gd b/RingsForHomalg/gap/Sage.gd index 962096390..8b075fa34 100644 --- a/RingsForHomalg/gap/Sage.gd +++ b/RingsForHomalg/gap/Sage.gd @@ -14,8 +14,6 @@ # #################################### -DeclareGlobalVariable( "HOMALG_IO_Sage" ); - BindGlobal( "SageMacros", rec() ); #################################### diff --git a/RingsForHomalg/gap/Sage.gi b/RingsForHomalg/gap/Sage.gi index 81a385155..edb91d20c 100644 --- a/RingsForHomalg/gap/Sage.gi +++ b/RingsForHomalg/gap/Sage.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( HOMALG_IO_Sage, +BindGlobal( "HOMALG_IO_Sage", rec( cas := "sage", ## normalized name on which the user should have no control name := "Sage", diff --git a/RingsForHomalg/gap/SageBasic.gd b/RingsForHomalg/gap/SageBasic.gd index 6bcc455e2..29a8718b1 100644 --- a/RingsForHomalg/gap/SageBasic.gd +++ b/RingsForHomalg/gap/SageBasic.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided by Sage. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForSageBasic" ); - diff --git a/RingsForHomalg/gap/SageBasic.gi b/RingsForHomalg/gap/SageBasic.gi index e5b990289..79716303f 100644 --- a/RingsForHomalg/gap/SageBasic.gi +++ b/RingsForHomalg/gap/SageBasic.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForSageBasic, +BindGlobal( "CommonHomalgTableForSageBasic", rec( diff --git a/RingsForHomalg/gap/SageBestBasis.gd b/RingsForHomalg/gap/SageBestBasis.gd index b5d4a465d..204dfb72f 100644 --- a/RingsForHomalg/gap/SageBestBasis.gd +++ b/RingsForHomalg/gap/SageBestBasis.gd @@ -7,12 +7,3 @@ ## Declarations for the rings with BestBasis provided by Sage. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForSageBestBasis" ); - diff --git a/RingsForHomalg/gap/SageBestBasis.gi b/RingsForHomalg/gap/SageBestBasis.gi index 50cac730c..c7a3a0530 100644 --- a/RingsForHomalg/gap/SageBestBasis.gi +++ b/RingsForHomalg/gap/SageBestBasis.gi @@ -23,7 +23,7 @@ def BestBasis_S_only(M):\n\ return TempMat\n\n"; ## -InstallValue( CommonHomalgTableForSageBestBasis, +BindGlobal( "CommonHomalgTableForSageBestBasis", rec( ## Can optionally be provided by the RingPackage diff --git a/RingsForHomalg/gap/SageTools.gd b/RingsForHomalg/gap/SageTools.gd index 7301b73a9..20d005e3a 100644 --- a/RingsForHomalg/gap/SageTools.gd +++ b/RingsForHomalg/gap/SageTools.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided sage. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForSageTools" ); - diff --git a/RingsForHomalg/gap/SageTools.gi b/RingsForHomalg/gap/SageTools.gi index af1b6a8fc..73c1fb8fe 100644 --- a/RingsForHomalg/gap/SageTools.gi +++ b/RingsForHomalg/gap/SageTools.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForSageTools, +BindGlobal( "CommonHomalgTableForSageTools", rec( Zero := HomalgExternalRingElement( R -> homalgSendBlocking( [ R, ".zero()" ], "Zero" ), "Sage", IsZero ), diff --git a/RingsForHomalg/gap/Singular.gd b/RingsForHomalg/gap/Singular.gd index 7961c8aaa..8441ea6fd 100644 --- a/RingsForHomalg/gap/Singular.gd +++ b/RingsForHomalg/gap/Singular.gd @@ -14,16 +14,6 @@ # dummy_variable to emulate Q by Q[dummy_variable] ############################################################################# -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "HOMALG_IO_Singular" ); - -DeclareGlobalVariable( "SingularMacros" ); - #################################### # # global functions and operations: diff --git a/RingsForHomalg/gap/Singular.gi b/RingsForHomalg/gap/Singular.gi index 4340a89f1..a1732d10f 100644 --- a/RingsForHomalg/gap/Singular.gi +++ b/RingsForHomalg/gap/Singular.gi @@ -18,7 +18,7 @@ # #################################### -InstallValue( HOMALG_IO_Singular, +BindGlobal( "HOMALG_IO_Singular", rec( cas := "singular", ## normalized name on which the user should have no control name := "Singular", @@ -130,7 +130,7 @@ InstallGlobalFunction( _Singular_multiple_delete, end ); ## -InstallValue( SingularMacros, +BindGlobal( "SingularMacros", rec( IsMemberOfList := "\n\ diff --git a/RingsForHomalg/gap/SingularBasic.gd b/RingsForHomalg/gap/SingularBasic.gd index 3256a8f6e..0ca7d91a4 100644 --- a/RingsForHomalg/gap/SingularBasic.gd +++ b/RingsForHomalg/gap/SingularBasic.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided by Singular. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForSingularBasic" ); - diff --git a/RingsForHomalg/gap/SingularBasic.gi b/RingsForHomalg/gap/SingularBasic.gi index cab76c31d..f9e281813 100644 --- a/RingsForHomalg/gap/SingularBasic.gi +++ b/RingsForHomalg/gap/SingularBasic.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForSingularBasic, +BindGlobal( "CommonHomalgTableForSingularBasic", rec( ## Must only then be provided by the RingPackage in case the default diff --git a/RingsForHomalg/gap/SingularBestBasis.gd b/RingsForHomalg/gap/SingularBestBasis.gd index f553552f8..c27aaa981 100644 --- a/RingsForHomalg/gap/SingularBestBasis.gd +++ b/RingsForHomalg/gap/SingularBestBasis.gd @@ -7,12 +7,3 @@ ## Declarations for the rings with BestBasis provided by Singular. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForSingularBestBasis" ); - diff --git a/RingsForHomalg/gap/SingularBestBasis.gi b/RingsForHomalg/gap/SingularBestBasis.gi index f02bbd2be..afada5f03 100644 --- a/RingsForHomalg/gap/SingularBestBasis.gi +++ b/RingsForHomalg/gap/SingularBestBasis.gi @@ -14,7 +14,7 @@ # #################################### -InstallValue( CommonHomalgTableForSingularBestBasis, +BindGlobal( "CommonHomalgTableForSingularBestBasis", rec( ## Can optionally be provided by the RingPackage diff --git a/RingsForHomalg/gap/SingularTools.gd b/RingsForHomalg/gap/SingularTools.gd index dc10b874b..822f048bb 100644 --- a/RingsForHomalg/gap/SingularTools.gd +++ b/RingsForHomalg/gap/SingularTools.gd @@ -7,12 +7,3 @@ ## Declarations for the rings provided by Singular. ## ############################################################################# - -#################################### -# -# global variables: -# -#################################### - -DeclareGlobalVariable( "CommonHomalgTableForSingularTools" ); - diff --git a/RingsForHomalg/gap/SingularTools.gi b/RingsForHomalg/gap/SingularTools.gi index 37ebe0ead..0b9fbe2d6 100644 --- a/RingsForHomalg/gap/SingularTools.gi +++ b/RingsForHomalg/gap/SingularTools.gi @@ -15,7 +15,7 @@ # #################################### -InstallValue( CommonHomalgTableForSingularTools, +BindGlobal( "CommonHomalgTableForSingularTools", rec( Zero := HomalgExternalRingElement( R -> homalgSendBlocking( [ "0" ], [ "number" ], R, "Zero" ), "Singular", IsZero ), diff --git a/RingsForHomalg/read.g b/RingsForHomalg/read.g index 63c5cccc0..47fac8b96 100644 --- a/RingsForHomalg/read.g +++ b/RingsForHomalg/read.g @@ -16,15 +16,6 @@ ## init ReadPackage( "RingsForHomalg", "gap/RingsForHomalg.gi" ); -## all the supported external computer algebra systems -ReadPackage( "RingsForHomalg", "gap/GAPHomalg.gi" ); -ReadPackage( "RingsForHomalg", "gap/Singular.gi" ); -ReadPackage( "RingsForHomalg", "gap/Macaulay2.gi" ); -ReadPackage( "RingsForHomalg", "gap/Sage.gi" ); -ReadPackage( "RingsForHomalg", "gap/MAGMA.gi" ); -ReadPackage( "RingsForHomalg", "gap/MapleHomalg.gi" ); -ReadPackage( "RingsForHomalg", "gap/Oscar.gi" ); - ## GAP (using the GAP implementation of homalg) ReadPackage( "RingsForHomalg", "gap/GAPHomalgBasic.gi" ); ReadPackage( "RingsForHomalg", "gap/GAPHomalgBestBasis.gi" ); @@ -77,6 +68,15 @@ ReadPackage( "RingsForHomalg", "gap/OscarBasic.gi" ); ReadPackage( "RingsForHomalg", "gap/OscarTools.gi" ); ReadPackage( "RingsForHomalg", "gap/OscarGroebner.gi" ); +## all the supported external computer algebra systems +ReadPackage( "RingsForHomalg", "gap/GAPHomalg.gi" ); +ReadPackage( "RingsForHomalg", "gap/Singular.gi" ); +ReadPackage( "RingsForHomalg", "gap/Macaulay2.gi" ); +ReadPackage( "RingsForHomalg", "gap/Sage.gi" ); +ReadPackage( "RingsForHomalg", "gap/MAGMA.gi" ); +ReadPackage( "RingsForHomalg", "gap/MapleHomalg.gi" ); +ReadPackage( "RingsForHomalg", "gap/Oscar.gi" ); + if IsBound( MakeThreadLocal ) then Perform( [