If you sell an individual stock for a loss (and that stock happens to be included in the S&P500) and reinvest the proceeds into an S&P500 index fund, is that regarded as substantially different enough to be able to take the loss without waiting 31 days?
Yes.
A wash sale only happens when you buy back substantially identical shares. S&P 500 is not substantilly identical to a single component company of the index.
Ira