Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/cap/examples/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 22.8.2025 mit Größe 652 B image not shown  

Quelle  DummyCategory.g   Sprache: unbekannt

 
#! @Chapter Examples and Tests

#! @Section Dummy implementations

#! @Subsection Dummy categories

#! @Example

LoadPackage( "CAP", false );
#! true

list_of_operations_to_install := [
    "ObjectConstructor",
    "MorphismConstructor",
    "ObjectDatum",
    "MorphismDatum",
    "IsCongruentForMorphisms",
    "PreCompose",
    "IdentityMorphism",
    "DirectSum",
];;

dummy := DummyCategory( rec(
    list_of_operations_to_install := list_of_operations_to_install,
    properties := [ "IsAdditiveCategory" ],
) );;

ForAll( list_of_operations_to_install, o -> CanCompute( dummy, o ) );
#! true
IsAdditiveCategory( dummy );
#! true

#! @EndExample

[ Dauer der Verarbeitung: 0.19 Sekunden  (vorverarbeitet)  ]