[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Intrinsics

Intrinsics

An intrinsic is a builtin Magma function or procedure. Most intrinsics perform some standard algebraic operation, though a few relate to the Magma system itself. A good way of getting information about an intrinsic is to use this help system. For summary information, you may obtain the intrinsic's signature. See Signature.

The name of almost every intrinsic starts with a capital letter. If the common mathematical name for what the intrinsic does has more than one word, then the Magma name will probably be the same name, with capital letters starting each word and with no intervening spaces. For instance, the intrinsic for finding the primitive root is called PrimitiveRoot. Several intrinsics have two names: a long explanatory one and a short convenient one. For instance, AbelianQuotientInvariants and AQInvariants are the same.

Almost all intrinsics have arguments. For instance, HammingCode(K, r) takes two arguments, a finite field K and an integer r. You could use it as

> HC := HammingCode(FiniteField(2), 4);

Some intrinsics have parameters. These are optional values supplied after the arguments and a colon (:) . If you do not specify a parameter, then Magma will use its "default value". For instance, the intrinsic IsSubsequence(Q, R) has a parameter called Kind, with a default value of "Consecutive":

> S1 := [6, 5];                                      
> S2 := [2, 6, 3, 5, 7];
> print IsSubsequence(S1, S2);                       
false
> print IsSubsequence(S1, S2 : Kind := "Sequential");
true

If a Boolean parameter B of an intrinsic I is being given the value true, then the syntax

I(ARGS : PARAM := EXPR, PARAM := EXPR, ..., B)
may be used instead of
I(ARGS : PARAM := EXPR, PARAM := EXPR, ..., B := true)

The library of intrinsic functions in Magma contains implementations of approximately 2000 algebraic and geometric algorithms. Highlights include:

[Next] [Prev] [Right] [Left] [Up] [Index] [Root]