Buddhist Scripture states that Buddha has three bodies: Dharma Body, Retribution Body, and Apparent Body.
Let's not talk about what Dharma Body is for now. The Retribution Body refers to the body obtained through spiritual cultivation, which the Ancient Moon God uses to represent the ideological traces left in people's hearts by the deceased. If a person gains insights while alive and manages to record these insights and pass them down through generations, leaving his ideological traces in the mortal world, it is as if he has left behind a Retribution Body.
Past mathematicians, physicists, and other ancestors passed down their summarized theories to future generations, which can also be considered as leaving behind their Retribution Bodies. The so-called "living in the hearts of the people" is just that.