Topos logic arises naturally