+ EXAMPLES:
+
+ Create the standard Legendre polynomials in `x`::
+
+ sage: legendre_p(0,x)
+ 1
+ sage: legendre_p(1,x)
+ x
+
+ Reuse the variable from a polynomial ring::
+ sage: P.<t> = QQ[]
+ sage: legendre_p(2,t).simplify_rational()
+ 3/2*t^2 - 1/2
+
+ If ``x`` is a real number, the result should be as well::
+
+ sage: legendre_p(3, 1.1)
+ 1.67750000000000
+
+ Similarly for complex numbers::
+
+ sage: legendre_p(3, 1 + I)
+ 7/2*I - 13/2
+
+ Even matrices work::
+
+ sage: legendre_p(3, MatrixSpace(ZZ, 2)([1, 2, -4, 7]))
+ [-179 242]
+ [-484 547]
+