# EulerCharacteristic -- topological Euler characteristic of a (smooth) projective variety

## Synopsis

• Usage:
EulerCharacteristic I
• Inputs:
• I, an ideal, a homogeneous ideal defining a smooth projective variety $X\subset\mathbb{P}^n$
• Optional inputs:
• BlowUpStrategy => ..., default value "Eliminate",
• MathMode => ..., default value false, whether to ensure correctness of output
• Verbose => ..., default value true,
• Outputs:
• an integer, the topological Euler characteristics of $X$.

## Description

This is an application of the method SegreClass. See also the corresponding methods in the packages CSM-A, by P. Aluffi, and CharacteristicClasses, by M. Helmer and C. Jost.

In general, even if the input ideal defines a singular variety $X$, the returned value equals the degree of the component of dimension 0 of the Chern-Fulton class of $X$. The Euler characteristic of a singular variety can be computed via the method ChernSchwartzMacPherson.

In the example below, we compute the Euler characteristic of $\mathbb{G}(1,4)\subset\mathbb{P}^{9}$, using both a probabilistic and a non-probabilistic approach.

 i1 : I = Grassmannian(1,4,CoefficientRing=>ZZ/190181); ZZ o1 : Ideal of ------[p ..p , p , p , p , p , p , p , p , p ] 190181 0,1 0,2 1,2 0,3 1,3 2,3 0,4 1,4 2,4 3,4 i2 : time EulerCharacteristic I -- used 0.289474 seconds o2 = 10 i3 : time EulerCharacteristic(I,MathMode=>true) MathMode: output certified! -- used 0.0947265 seconds o3 = 10

## Caveat

No test is made to see if the projective variety is smooth.