Basic summary: "e" and "d" are computed using private "p" , "q", and lambda(n), so that their properties hold. These computations are done using an algebra of modular arithmetic. Totient functions, greatest common multiples, and many other things. When solving the systems involved in "e" and "d", that algebra would be discovered.