2" main sewer line allowed ?

Ironically this week I have seen two different houses with the main sewer line inside the house being 2" PVC pipe going into the 4" house trap before leading outside into cesspool or sewer system. Both houses have 1 or 1-1/2 bathrooms.
I have never seen the use of a 2" diameter pipe being used for the house main sewer drain leading to the cesspool/sewer system in my 4 years of home inspections.
The toilet is required to be at least 3" drain pipe but I can not find what the main line should be. I understand plumbers use a mathematical flow equation but 2" seems too small. I would think 3" be the minimum as majority of houses are 4".
Any knowledge or opinions would be appreciated.
I told buyers that the 2" seems to be small but a plumber would need to computate a water flow amount based on the fixtures to properly size the pipe.

I would think a big turd with toilet paper would stop up a 2’ drain.

A 3 inch diameter pipe is the minimum size for any building drain or building sewer pipe that connects to a toilet. 1. Install horizontal drain and sewer pipe with a uniform slope and alignment.

Put it this way what is the size of the waste stack ?

Good literature. Ty. Stack was 3" and other house was 4". Good point.

Yeah reductions not allowed anywhere.