Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/gbnp/lib/nmo/   (GAP Algebra Version 4.15.1©)  Datei vom 29.7.2024 mit Größe 1 kB image not shown  

Quelle  ncutils.gi   Sprache: Shell

 

#############################################################################
##
#W  ncutils.gi                NMO Utils                        Randall Cone
##
##  (C) 2010 Mathematics Dept., Virginia Polytechnic Institute, USA
##
#############################################################################

InstallMethod(
  PatchGBNP,
  "patches GBNP to use new orderings",
  true,
  [ IsNoncommutativeMonomialOrdering ],
  0,
  function(ncordering)
    MakeReadWriteGlobal("LtNP");
    UnbindGlobal("LtNP");
    DeclareGlobalFunction("LtNP");
    MakeReadWriteGlobal("LtNP");
    LtNP := OrderingLtFunctionListRep(ncordering);
    MakeReadOnlyGlobal("LtNP");

    Print("LtNP patched.\n");

    MakeReadWriteGlobal("GtNP");
    UnbindGlobal("GtNP");
    DeclareGlobalFunction("GtNP");
    MakeReadWriteGlobal("GtNP");
    GtNP := OrderingGtFunctionListRep(ncordering);
    MakeReadOnlyGlobal("GtNP");

    Print("GtNP patched.\n");
  end
);


InstallGlobalFunction(
  UnpatchGBNP,
  function()

    # Fix GBNP's LtNP function:
    MakeReadWriteGlobal("LtNP");
    UnbindGlobal("LtNP");
    DeclareGlobalFunction("LtNP");
    MakeReadWriteGlobal("LtNP");

    InstallGlobalFunction(
      LtNP,function(u,v)
        if Length(u)<Length(v) then
           return(true);
        elif Length(u)=Length(v) then
           return(u<v);
        else return(false);
        fi;
      end);;

    MakeReadOnlyGlobal("LtNP");
    Print("LtNP restored.\n");

    # Fix GBNP's GtNP function:
    MakeReadWriteGlobal("GtNP");
    UnbindGlobal("GtNP");
    DeclareGlobalFunction("GtNP");
    MakeReadWriteGlobal("GtNP");

    InstallGlobalFunction(
      GtNP,function(u,v)
        if Length(u)>Length(v) then
           return(true);
        elif Length(u)=Length(v) then
               return(u>v);
        else return(false);
        fi;
    end);;

    MakeReadOnlyGlobal("GtNP");
    Print("GtNP restored.\n");

  end
);;

Messung
CHZG
878710091

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.