In addition to the thickness of the slab, the psi capacity of the concrete ought to be considered. For a shop I'd go with a minimum of 3,000 psi. Under perfect conditions with well compacted and prepared material below the slab, a 4" slab might suffice. I've never seen those perfect conditions achieved. Another consideration is if you have iron in the slab and then want to put in some anchors later for something you didn't anticipate, you might find it problematic to drill a deep enough hole for the anchors without drilling through the slab or hitting iron. When we designed our new shop several of our guidelines came from things my dad told me about shops many years ago (he was a self employed tool & die maker / machinist):
1. When you build a shop it can't be too big. Build what you can afford and fit in the available space.
2. Never put a shop on a slab less than 6" thick. A six inch slab can handle some thin spots - a 4" slab can't.
3. Include 1/3 to 1/2 the sq footage of the shop in exterior concrete - a large apron in front of the door for outside work on vehicles and generous walkways along the sides.
We followed all of those and 2 years later we're glad we did!
Howard