It stopped being a heap at the moment at which there were no longer both:<p>(1) more than one vertical layer (the requirement for it to be a pile), and<p>(2) each grain not directly in contact with the ground being above a point on the ground within the triangle defined the points on the ground directly underneath three lower grains (distinguishing a heap from other piles).<p>(Of course, you may have a different definition of a heap, but if once you make concrete what you mean by a &quot;heap&quot;, the problem is resolved. If you view heap as a fuzzy concept, then there is a continuous-valued fuzzy membership function, and there is no crisp point at which the collection stops, or starts, being a heap.)