  We prove certain generalization of Hardy's inequality where the "boundary
defining function" is replaced by a polynomial defining a singular algebraic
variety. An application is given on the existence of a small time heat trace
expansion for a Schr\"odinger operator with mild singularities along this
algebraic set.
