| > | with(difforms):with(LinearAlgebra):with(combinat): |
Warning, the protected name Chi has been redefined and unprotected
| > | Gamma:=proc(g::Matrix,coords::Vector) local i,j,k,l,gi,gamm; gi:=g^(-1); gamm:=Array(1..RowDimension(g),1..RowDimension(g),1..RowDimension(g)); for i from 1 to RowDimension(g) do for j from 1 to RowDimension(g) do for k from 1 to RowDimension(g) do gamm[i,j,k]:=(1/2)*add(gi[k,l]*(diff(g[j,l],coords[i])+diff(g[i,l],coords[j])-diff(g[i,j],coords[l])),l=1..RowDimension(g)); end do; end do; end do; return(gamm); end proc; |
| > | g:=Matrix(2,2,[[1,0],[0,sin(phi1)^2]]); |
| > | coords:=Vector([phi1,phi2]); |
| > | G:=Gamma(g,coords); |
| > | type(g,Matrix); |
| > | RowDimension(g); |
| > | g[1,1]; |
| > | g^(-1); |
| > | G_(1,2,1); |
| > | G[1,2,1]; |
| > | print(G); |
| > | G[1]; |
| > | G[2]; |
| > | G[1,2,2]; |
| > | defform(phi1=scalar,phi2=scalar,phi3=scalar,phi4=scalar,phi5=scalar,e1=1,e2=1,e3=1,e4=1,e5=1); |
| > | g:=Matrix(5,5,[[1,0,0,0,0],[0,sin(phi1)^2,0,0,0],[0,0,1,0,0],[0,0,0,sin(phi3)^2,0],[0,0,0,0,sin(phi3)^2*sin(phi4)^2]]); |
| > | En:=Vector(5,symbol=E); |
| > | en:=Vector(5,[e1,e2,e3,e4,e5]); |
| > | Conn:=(i,j,b,G)->add(G[i,j,m]*b[m],m=1..Dimension(b)); |
| > | coords:=Vector(5,[phi1,phi2,phi3,phi4,phi5]); |
| > | G:=Gamma(g,coords); |
| > | Conn(1,1,En,G); |
| > | CMatrix:=Matrix(5,5); |
| > | for i from 1 to 5 do for j from 1 to 5 do CMatrix[i,j]:=Conn(i,j,En,G); end do; end do; |
| > | CMatrix; |
| > | CMatrix[1,2] mod En[2]; |
| > | mods(CMatrix[1,2],En[2]); |
| > | CMatrix[1,2]; |
| > | coeffs(CMatrix[1,2],En[1]); |
| > | coeff(CMatrix[1,2],En[5]); |
| > | conforms:=proc(C::Matrix,B::Vector,DB::Vector) local i,j,k,omega,n; n:=RowDimension(C); omega:=Matrix(n); for i from 1 to n do for j from 1 to n do omega[i,j]:=add(coeff(C[k,i],En[j])*DB[k],k=1..n); end do; end do; return(omega); end proc; |
| > | conforms(CMatrix,En,en); |
| > | RelativeParity:=proc(p1::list,p2::list) description "determine the relative parity of two permutations"; table( 'antisymmetric'); op(1,%[p1[]])*op(1,%[p2[]]) end: |
| > | Phi:=proc(k::integer,O::Matrix,o::Matrix) local sum,temp,alpha,i,j,n; n:=RowDimension(O); sum:=0; for alpha in permute(n-1) do temp:=1; for i from 1 to k do temp := temp &^ O[alpha[2*i-1],alpha[2*i]]; end do; for i from 2*k+1 to n-1 do temp := temp &^ o[alpha[i],n]; end do; sum:= sum + RelativeParity(alpha,[seq(i,i=1..n-1)])*temp; end do; end proc; |
| > | CurvatureForm := (i,j,o) -> d(o[i,j]) - add(o[i,k] &^ o[k,j],k=1..RowDimension(o)); |
| > | PI:=proc(O::Matrix,o::Matrix) local lambda,p,total,n; n:=RowDimension(O); total:=0; if ((n mod 2) = 1) then p := (n-1)/2; for lambda from 0 to p do total:=total+(-1)^lambda * binomial(p,lambda) * Phi(lambda,O,o); end do; return(1/(2^n * Pi^p * p!) * total); else p:=n/2; for lambda from 0 to p-1 do total:=total+(-1)^lambda * product(2*i-1,i=1..p-lambda)*Phi(lambda,O,o); end do; return 1/Pi^p * total; end if; end proc; |
| > | CM2:=Matrix(3,[[0,(2*lambda-1/lambda)*En[3],(1/lambda-2*lambda)*En[2]],[-1/lambda*En[3],0,(1/lambda)*En[1]],[1/lambda*En[2],(-1/lambda)*En[1],0]]); |
| > | omega:=conforms(CM2,En,en); |
| > | omega:=conforms(CMatrix,En,en); |
| > | Omega:=Matrix(5): |
| > | for i from 1 to 5 do for j from 1 to 5 do Omega[i,j]:=CurvatureForm(i,j,omega); end do; end do; |
| > | PI5:=PI(Omega,omega): |
| > | simpform(simplify(simpform(PI5))); |
| > |