Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/homalg/examples/doc/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 10.0.2024 mit Größe 1 kB image not shown  

Quelle  HomalgElement_in.g   Sprache: unbekannt

 
Spracherkennung für: .g vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

##  <#GAPDoc Label="HomalgElement_in:example">
##  <Example><![CDATA[
##  gap> zz := HomalgRingOfIntegers( );
##  Z
##  gap> M := 2 * zz;
##  <A free left module of rank 2 on free generators>
##  gap> a := HomalgModuleElement( "[ 6, 0 ]", M );
##  ( 6, 0 )
##  gap> N := Subobject( HomalgMap( "[ 2, 0 ]", 1 * zz, M ) );
##  <A free left submodule given by a cyclic generator>
##  gap> K := Subobject( HomalgMap( "[ 4, 0 ]", 1 * zz, M ) );
##  <A free left submodule given by a cyclic generator>
##  gap> a in M;
##  true
##  gap> a in N;
##  true
##  gap> a in UnderlyingObject( N );
##  true
##  gap> a in K;
##  false
##  gap> a in UnderlyingObject( K );
##  false
##  gap> a in 3 * zz;
##  false 
##  ]]></Example>
##  <#/GAPDoc>

LoadPackage( "Modules" );

zz := HomalgRingOfIntegers( );
M := 2 * zz;
a := HomalgModuleElement( "[ 6, 0 ]", M );
N := Subobject( HomalgMap( "[ 2, 0 ]", 1 * zz, M ) );
L := Subobject( HomalgMap( "[ 3, 0 ]", 1 * zz, M ) );
K := Subobject( HomalgMap( "[ 4, 0 ]", 1 * zz, M ) );

Assert( 0, a in M );
Assert( 0, a in N );
Assert( 0, a in UnderlyingObject( N ) );
Assert( 0, a in L );
Assert( 0, a in UnderlyingObject( L ) );
Assert( 0, not a in K );
Assert( 0, not a in UnderlyingObject( K ) );
Assert( 0, not a in 3 * zz );

[ Dauer der Verarbeitung: 0.42 Sekunden  ]