As with most other things. Advice is advice and YMMV.
I took one of my Craigs List flipper bikes to make something for Cheryl. I took off 50X559 knobbie MTB tires and put on 40X559 road tires--smooth with "rider comfort grooves". On a nothingoutoftheordinary Big Box MTB wheel the 40mm tire fit and they worked great.
But, on this particular tire/wheel combo I played hell getting the bead to seat evenly around the rim. I had to partially inflate the tire and bounce it around until everything popped into place.
The sizes for rim vs. wheel fit perfectly into any chart you'd care to use. This combo just happened to be a stinker.