An introduction to the weighted fundamental lemma IV