Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/ibnp/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 11.8.2025 mit Größe 3 kB image not shown  

Quelle  poly.xml   Sprache: XML

 
<?xml version="1.0" encoding="UTF-8"?> 

<Chapter Label="chap-poly">

<Heading>Functions for Noncommutative Polynomials</Heading>

<Section Label="sec-polyops">
<Heading>Basic functions for polynomials</Heading>

<ManSection>
   <Oper Name="MaxDegreeNP"
         Arg="polylist" />
<Description>
Given an <C>FAlgList</C>, this function calculates the degree of the 
lead term for each element of the list and returns the largest value found.
In the example this is <M>v</M> with degree <M>4</M>
</Description>
</ManSection>
<Example>
<![CDATA[
gap> A2 := AlgebraIBNP;
<algebra-with-one over Rationals, with 2 generators>
gap> a := A2.1;; b := A2.2;;
gap> ord := NCMonomialLeftLengthLexicographicOrdering( A2 );;
gap> u := [ [ [1,1,2], [2,1], [1] ], [3,2,-1] ];;
gap> v := [ [ [1,1,2,1], [1,2,2], [2,1] ], [4,-2,1] ];;
gap> w := [ [ [2,1,2], [1,2], [2] ], [2,-1,3] ];; 
gap> L3 := [ u, v, w ];; 
gap> PrintNPList( L3 ); 
 3a^2b + 2ba - a 
 4a^2ba - 2ab^2 + ba 
 2bab - ab + 3b 
gap> MaxDegreeNP( L3 );
4
]]>
</Example>

<ManSection>
   <Oper Name="ScalarMulNP"
         Arg="pol const" />
<Description>
Arithmetic with polynomials is performed using the <Package>GBNP</Package>
functions <C>AddNP</C>, <C>MulNP</C> and <C>BimulNP</C>.
We find it convenient to add here a function which multiplies a polynomial
by an element of the underlying field of the algebra.
<P/>
<!-- ---Does this actually get used? ----- Better to move it to GBNP?--- -->
</Description>
</ManSection>
<Example>
<![CDATA[
gap> u2 := ScalarMulNP( u, 2 );;  PrintNP( u2 );
 6a^2b + 4ba - 2a
gap> x := [ [ [2,1] ], [5] ];;  PrintNP( x );
 5ba 
gap> v2 := AddNP( v, x, 1, -2 );;  PrintNP( v2 );
 4a^2ba - 2ab^2 - 9ba 
gap> w2 := MulNP( w, x );;  PrintNP( w2 );
 10bab^2a - 5ab^2a + 15b^2a 
gap> u3 := BimulNP( [2,2], u, [1,1] );;  PrintNP( u3 );               
 3b^2a^2ba^2 + 2b^3a^3 - b^2a^3 
]]>
</Example>

<ManSection>
   <Oper Name="LtNPoly"
         Arg="pol1 pol2" />
   <Oper Name="GtNPoly"
         Arg="pol1 pol2" />
<Description>
These two functions generalise the <Package>GBNP</Package> functions
<C>LtNP</C> and <C>GtNP</C> which (confusingly) apply only to monomials.
They compare a pair of polynomials
with respect to the monomial ordering currently being used.
In the example we check that <M>w > u</M>, that <M>u < 2u</M> 
and <M>v > v-10ba</M>.
</Description>
</ManSection>
<Example>
<![CDATA[
gap> [ LtNPoly( w, u ), LtNPoly( u, u2 ) ];     
[ false, true ]
gap> GtNPoly( v, v2 );
true
gap> ## LtNPoly and GtNPoly may be used within the Sort command:
gap> L4 := [u,v,u2,v2];
[ [ [ [ 1, 1, 2 ], [ 2, 1 ], [ 1 ] ], [ 3, 2, -1 ] ], 
  [ [ [ 1, 1, 2, 1 ], [ 1, 2, 2 ], [ 2, 1 ] ], [ 4, -2, 1 ] ], 
  [ [ [ 1, 1, 2 ], [ 2, 1 ], [ 1 ] ], [ 6, 4, -2 ] ], 
  [ [ [ 1, 1, 2, 1 ], [ 1, 2, 2 ], [ 2, 1 ] ], [ 4, -2, -9 ] ] ]
gap> Sort( L4, GtNPoly );
gap> L4;
[ [ [ [ 1, 1, 2, 1 ], [ 1, 2, 2 ], [ 2, 1 ] ], [ 4, -2, 1 ] ], 
  [ [ [ 1, 1, 2, 1 ], [ 1, 2, 2 ], [ 2, 1 ] ], [ 4, -2, -9 ] ], 
  [ [ [ 1, 1, 2 ], [ 2, 1 ], [ 1 ] ], [ 6, 4, -2 ] ], 
  [ [ [ 1, 1, 2 ], [ 2, 1 ], [ 1 ] ], [ 3, 2, -1 ] ] ]
]]>
</Example>

<ManSection>
   <Oper Name="LowestLeadMonomialPosNP"
         Arg="polylist" />
<Description>
Given a list of polynomials, this function looks at all the leading
monomials and returns the position of the smallest lead monomial 
with respect to the monomial ordering currently being used.
In the example, since <C>L4</C> is sorted, the fourth polynomial
is the least.
</Description>
</ManSection>
<Example>
<![CDATA[
gap> LowestLeadMonomialPosNP( L4 );
4
]]>
</Example>


</Section>

</Chapter>

94%


¤ Dauer der Verarbeitung: 0.27 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.