tensor(deprecated)/petrov - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : tensor(deprecated)/petrov





finds the Petrov classification of the Weyl tensor


Calling Sequence





Calling Sequence

petrov(psi, options)




array indexed from 0 to 4



none, one, or both of: 'verify=name' and 'simp'


Important: The tensor package has been deprecated. Use the superseding command DifferentialGeometry[Tensor][PetrovType].


The procedure petrov is for determining the Petrov type of a given Weyl tensor in Newman-Penrose form.  The Petrov classification of the Weyl tensor is a result of determining the multiplicity of the roots of the following quartic polynomial (Q) in z:



where the psi values are the Newman-Penrose Weyl tensor components.  Given the coefficients psi[i], the petrov algorithm returns the Petrov type by using quartic theory.  The different cases are outlined in the table below.

Petrov Type    Solutions of (Q)


     type I    four distinct roots

    type II    one root of multiplicity 2; other two roots distinct

     type D    two distinct roots of multiplicity 2

   type III    one root of multiplicity 3; other root distinct

     type N    one root of multiplicity 4

     type 0    degenerate, all psi[i] = 0


The algorithm uses the zero/nonzero nature of the coefficients as well as the zero/nonzero nature of some expressions in the coefficients to determine the Petrov type.  Note that, in view of the structure of equation (Q), any common factor amongst the ψi can be removed before the algorithm is called without changing the result.


The ψi coefficients for a given null tetrad may be calculated using the tensor[npcurve] procedure.  It is important that the coefficients be in a simplified form.  This is especially true if one or more of the coefficients is identically zero.  For added efficiency it is suggested that any common factor of all the coefficients be removed before calling petrov. The functions ?content and ?primpart can help here.  See ?tensor[act] for help on simplification of the NP curvature components produced by tensor[npcurve].


The Petrov classification algorithm may be accessed with the command

petrov(psi, options);


where psi is an array indexed from 0 to 4 which contains the Newman-Penrose Weyl tensor components, and where the options may be both, one, or none of: 'verify'='name' and 'simp'.  The procedure petrov returns the Petrov type that it determines.


If 'simp' is specified then the ψi will be simplified using an internal routine. This should be avoided by making sure the coefficients are in their most simplified form before invoking petrov.


The procedure petrov calculates expressions and tests when some of them are identically zero. The zero test may fail if some identities are not applied.  For example, the expression cos(x)^2+sin(x)^2-1 is not known to be zero by petrov .  Therefore, it is important to verify that any determined nonzero expressions are in fact nonzero. The procedure Testzero() is used to check whether the appropriate expressions are zero, see below. The nonzero values will be returned in name if the 'verify' option is given in the call to petrov.  Thus, the command petrov(psi, 'simp', 'verify'='NONzero') (equivalently, petrov(psi, 'verify'='NONzero', 'simp')) will invoke the simplification of the psi components, classify the components, and then return the nonzero values in the variable NONzero for verification.


If you would like to add a simplification to petrov, then define the procedure `tensor/petrov/simp` which accepts one argument and returns a simplified form of the argument.  This simplification routine will be automatically applied whenever the routine does any internal simplification of computed expressions.  For example, the procedure `tensor/petrov/simp` := proc(a) simplify(a,trig) end proc; could be used to simplify the expression cos(x)^2+sin(x)^2-1 to zero.  For more information, see ?tensor[simp].


The environment procedure Testzero is used to control the determination of whether its argument is equal to zero. If you write your own procedure, it should return true in that case. For example, Testzero:=testeq will use a fast random tester. A stronger version (but slower) is Testzero:=proc(u) evalb(simplify(u,trig)=0) end proc: Since this procedure is an environment variable, it obeys the rules for environment variables, see ?environment for more information.


This function is part of the tensor package, and can be used in the form petrov(..) only after performing the command with(tensor), or with(tensor, petrov).  The function can always be accessed in the long form tensor[petrov].


Important: The tensor package has been deprecated. Use the superseding command DifferentialGeometry[Tensor][PetrovType].












This shows that x=1 is a potential special case, but then you are no longer dealing with a quadric. However, you can simplify with respect to the other factor

Testzero:=proc(u) evalb( simplify(u, {x^3+x^2-1})=0) end proc:










since this is nonzero, then U_ cannot be zero at the same time as V_ Therefore, except when x=1, you always have four different roots.



Letniowski, F.W., and McLenaghan, R. G. "An Improved Algorithm for Quartic Equation Classification and Petrov Classification." General Relativity and Gravitation, Vol. 20. Plenum Publishing Corporation, (1988): 463-483.


Note: The labels used to return the nonzero quantities, using the 'verify' option correspond to the quantities used in this article, with an underscore appended.

See Also