Let's take an isothermic expansion of an ideal gas as example.
In a reversible process, the work done by the system is w=nrT*ln(Vf/Vi). Being the process isothermic, q(absorbed)=w(done), since the difference in energy is 0.
In a reversible process, the work is w=p(Vf-Vi), which is equal to q, since it is also isothermic.
In both cases, the heat absorbed by the enviroment is equal to the heat released by the system. So, in the case which T(enviroment)=T(system), the variation in entropy of the universe is zero? Regardless of the reversible/irreversible nature of the transformation?
If not, can you suggest me a book where to study or understand this basic concept? I've tried Atkins, McQuarrie, youtube videos, but I'm still stuck.