One of the basic doctrines of Buddhist teachings is the law of karma. What is the law of karma? The information (karma) about actions or deeds performed in the past and present time, committed by the body, language, and mind is stored in the mind/soul. If the cause and condition are together and the time comes, karma will grow like the plant grows when the corresponding condition comes. If people did good deeds, then they brought happiness, if they did bad deeds, causing suffering (first law of karma). Even if karma does not grow in this life, be it happiness or suffering, after the death of an animal and a person, a soul with karma does not die and does not disappear. It is reborn in one of the 6 species of animals of the non-eternal universe depending on their karma and still exists in the universe from one birth to another birth (second law of karma). In this book, we proved and verified the first stage of the law of karma using the theory of optimal control and proved and confirmed the second stage of the law of karma using set theory and quantum physics. We demonstrate that life is a rational combination of evolution and reincarnation.