The GPS signal is a basic time/distance equation from a minimum of 3 satellites. Unfortunately, the time in the GPS receiver is not as accurate as the time in the satellite clock, which introduces a 4th variable.
1) latitude
2) longitude
3) height above the geoid
4)time
So a minimum of 4 satellites for a GPS position. If you have a known, say barometric height, it drops to 3 satellites.
For RAIM, we need 5 satellites. This allows the receiver to detect a problem with one of the satellites, but not which one is faulty. For that, we need 6.