Gorenstein scheme

In algebraic geometry, a Gorenstein scheme is a locally Noetherian scheme whose local rings are all Gorenstein. The canonical line bundle is defined for any Gorenstein scheme over a field, and its properties are much the same as in the special case of smooth schemes.
Related properties.
For a Gorenstein scheme "X" of finite type over a field, "f": "X" → Spec("k"), the dualizing complex "f"!("k") on "X" is a line bundle (called the canonical bundle "K""X"), viewed as a complex in degree −dim("X"). If "X" is smooth of dimension "n" over "k", the canonical bundle "K""X" can be identified with the line bundle Ω"n" of top-degree differential forms.
Using the canonical bundle, Serre duality takes the same form for Gorenstein schemes as it does for smooth schemes.
Let "X" be a normal scheme of finite type over a field "k". Then "X" is regular outside a closed subset of codimension at least 2. Let "U" be the open subset where "X" is regular; then the canonical bundle "K""U" is a line bundle. The restriction from the divisor class group Cl("X") to Cl("U") is an isomorphism, and (since "U" is smooth) Cl("U") can be identified with the Picard group Pic("U"). As a result, "K""U" defines a linear equivalence class of Weil divisors on "X". Any such divisor is called the canonical divisor "K""X". For a normal scheme "X", the canonical divisor "K""X" is said to be Q-Cartier if some positive multiple of the Weil divisor "K""X" is Cartier. (This property does not depend on the choice of Weil divisor in its linear equivalence class.) Alternatively, normal schemes "X" with "K""X" Q-Cartier are sometimes said to be Q-Gorenstein.
It is also useful to consider the normal schemes "X" for which the canonical divisor "K""X" is Cartier. Such a scheme is sometimes said to be Q-Gorenstein of index 1. (Some authors use "Gorenstein" for this property, but that can lead to confusion.) A normal scheme "X" is Gorenstein (as defined above) if and only if "K""X" is Cartier and "X" is Cohen–Macaulay.