/* LOAD THIS FILE INTO MAGMA BY TYPING iload "demo.txt"; */ /* Change the line below to reflect the correct path */ load "~/tue/research/paloalto/magma_demo/demo_defs.txt"; sheet_head(); sheet_contents(); prm("Magma in general"); /* Syntax */ P := PolynomialRing(Rationals()); d := Xgcd(x^5 + x^3 + 3*x^2 + 3, x^10 + 3*x^7 + x^4 + 2*x^3 + 3*x + 6); d; d,a,b := Xgcd(x^5 + x^3 + 3*x^2 + 3, x^10 + 3*x^7 + x^4 + 2*x^3 + 3*x + 6); a*(x^5+x^3+3*x^2+3) + b*(x^10+3*x^7+x^4+2*x^3+3*x+6); // l := [ i : i in [1..100] | IsPrime(i) ]; #l; #[ i : i in l | i mod 4 eq 1 ]; // sub where G is SymmetricGroup(4); #$1; /* Error handling */ try for i in [3..0 by -1] do print 1/i; end for; catch e print "Whoops: ", e`Object; end try; /* The profiler */ fib := func; fib(8); SetProfile(true); time _ := fib(20); G := ProfileGraph(); SetProfile(false); ProfilePrintByTotalTime(G); fib := func; fib(8); SetProfile(true); time _ := fib(20); G := ProfileGraph(); SetProfile(false); ProfilePrintByTotalTime(G); prm("Support for Lie groups"); /* Root data */ R := RootDatum("A4" : Isogeny := "Ad"); G := GroupOfLieType(R, GF(59)); Order(G); FactoredOrder(G); Dimension(G); CenterPolynomials(G); // DynkinDiagram(G); CartanMatrix(G); // W := WeylGroup(G); W; // g := GraphAutomorphism(G, Sym(4)!(1,4)(2,3)); g; [ g(elt >) : i in [1..4] ]; // x := Random(G); x; [ IsSemisimple(x), IsUnipotent(x), IsCentral(x) ]; //By default, the Steinberg presentation is used: // G = UTWU x := elt, <7, 31>, <10, 29> ], Vector([58, 43, 9, 15]), 1, 2, 1, 3, 2, 1, 4, [ <9, 44>, <11, 19>, <12, 24>, <3, 23> ] *]>; x; //But it is easy to go to other presentations: sr := StandardRepresentation(G); X := sr(x); X; Determinant(X); //And, due to an algorithm by Cohen, Murray, and // Taylor, we can go back as well: X @@ sr; X @@ sr eq x; //Galois Cohomology: // (Due to Haller) // Compute the cohomology of A_3(5^2) q := 5; k := GF(q); K := GF(q^2); G := GroupOfLieType( "A3", K : Isogeny:="SC" ); A := AutomorphismGroup(G); AGRP := GammaGroup( k, A ); Gamma,m := ActingGroup(AGRP); Gamma; m; time GaloisCohomology(AGRP); // And now the cocycle defining the group 2A_3(5) // and check for two elements if they are contained // in 2A_3(5): c := OneCocycle( AGRP, [GraphAutomorphism(G, Sym(3)!(1,3))] ); x := Random(G); IsInTwistedForm( x, c ); x := elt< G | <1,y>, <3,y @ m(Gamma.1)> > where y is Random(K); IsInTwistedForm( x, c ); //The twisted group 2 A_3(5) as a subgroup of A_3(5^2). R := RootDatum("A3" : Twist := 2); G := TwistedGroupOfLieType(R,5,25); G; BaseRing(G); DefRing(G); UntwistedOvergroup(G); prm("LiE"); /* "Combinatorics with representations" */ A2 := RootDatum("A2" : Isogeny := "SC"); L := LieAlgebra(A2, Rationals()); _,_,T := StandardBasis(L); rho := AdjointRepresentation(L); V := VectorSpace(Rationals(), 8); //Now V is an L-module by v --> x.v = rho(x).v MT := [ Transpose(Matrix(rho(t))) : t in T ]; MT; //Weights are: (-1,1), (1,-2), ... ,(1,1) //Dominant weights: (0,0),(0,0),(1,1) rho1 := HighestWeightRepresentation(L, [1,1]); rho2 := HighestWeightRepresentation(L, [2,0]); MT := [ Transpose(TensorProduct(Matrix(rho1(t)), Matrix(rho2(t)))) : t in T ] ; {* Vector([(B[i]*m)[i] : m in MT]):i in [1..#B] *} where B is Basis(VectorSpace(Rationals(),48)); //But these dimensions quickly grow! //We can find out a lot about the representations // by just considering the highest weights //LiE, by Van Leeuwen, Cohen, Lisser // Ported to Magma in summer 2006 drho1 := LieRepresentationDecomposition(A2, [1,1]); drho2 := LieRepresentationDecomposition(A2, [2,0]); dtp := Tensor(drho1, drho2); dtp:Maximal; RepresentationDimension(dtp); [ RepresentationDimension(LieRepresentationDecomposition(A2, w)) : w in dtp`WtsMps[1] ]; &+$1; prm("THE END"); // // // // // // // // //Branch A1T1 := RootDatum("A1T1" : Isogeny := "SC"); M := RestrictionMatrix(A2, A1T1); D := Branch(A1T1, dtp, M); RepresentationDimension(D); /* Ex: Conjugation into the standard torus */ rho, L := AdjointRepresentation(G); X := rho(x); Eigenvalues(X); // chp := CharacteristicPolynomial(X); Factorization(chp); P := PolynomialRing(GF(59)); F := GF(59); for f in Factorization(chp) do if Degree(f[1]) gt 1 then F := ext; end if; end for; // G := ChangeRing(G, F); rho,L := AdjointRepresentation(G); X := rho(x); N := Nullspace( Matrix(X) - 1 ); Cent, centphi := sub< L | [ L!x : x in Basis(N) ] >; H := SplittingCartanSubalgebra(Cent); //doesn't really work