An introduction to the weighted fundamental lemma I