In the case where there is a pattern of a lower layer formed in the preceding process of a process at the time of the inspection beneath a pattern to-be-inspected, part of the pattern to-be-inspected where there is a pattern of the lower layer formed in the preceding process of the process at the time of the inspection and part of the pattern to-be-inspected where there is no pattern of the lower