The phenomenon mentioned here is often called Conditional Inversion in the linguistic literature. Here's an interesting paper about it.
One difference between Conditional Inversion and if is that inversion is really only possible with those three verbs, as you note, and hence is usually only found with counterfactuals. Another difference is that inversion doesn't work well with the focus adverb only:
- Only if I had thought that he was sick would I have called
him.
- *Only had I thought that he was sick would I have called
him.
Those are my judgements and the judgements of the authors of the paper I linked to, and my guess is that they are in line with modern usage generally, though it would be good to check. The Iatridou & Embick paper gives some more potential contrasts. Their conclusion is that verb-initial conditional clauses can't be focused, and that "The use of inversion is meant to indicate the fact that the truth of the proposition in the antecedent is old [information]".
A side point is that in the recent history of English this type of inversion was possible with a lot more verbs, including could, would, might and did (Denison 1998: 298-300). This might account for the overall rather formal flavour of these examples, as Greg Lee mentioned in his comment.
Still, in a large number of situations the two constructions are completely interchangeable (for me at least).
Ref: Denison, David. 1998. Syntax. In Suzanne Romaine (ed), The Cambridge Grammar of the English Language, vol. 4: 1776-1997, 292-329. Cambridge: Cambridge University Press.
There are just two ways of using should: one is with the simple infinitive for non-past senses, and the other is with the perfect infinitive for past senses. Those are your only two choices.
Key opposing concepts:
- simple infinitive versus past infinitive
- deontic modality versus epistemic modality
- protasis versus apodosis
Modalities of Modals
Before we show you why, you first need to understand that English does not have numbered conditionals. It looks like you are getting tangled up because you are trying to force English into a model that does not apply to it. Therefore once you banish that mythology from your mind, you will do much better.
Modals have two possible senses, one deontic implying obligation and the other epistemic implying probability. There are many, many, many ways to mix and match these, even when just one modal is involved. That’s because you can use should in either protasis or apodosis, or both, and whether it is in the deontic or epistemic mode can also vary. What does not vary, however, is your choice between a simple infinitive for non-past senses and a perfect infinitive for past senses.
This is the epistemic (=probability) sense in the protasis, which admits inversion in formal registers:
- If it should rain, you will stay dry.
- Should it rain, you will stay dry.
- Should it have rained, you would have stayed dry.
Here is deontic (=obligation) should in both protasis and apodosis:
- If you should bring a raincoat, I should bring one, too.
That means:
- If you need to bring a raincoat, then I also need to bring a raincoat.
It is possible to read the previous sentence as containing epistemic (=probability) should in the protasis, making it equivalent to:
- If you happen to have a raincoat, I ought to bring one.
However, that would be rarely used, being quite stuffy. Note that a deontic (=obligation) should in the protasis does not permit inversion the way an epistemic one does. Whenever you see should involved inversion in the protasis, you know it is epistemic:
- Should (epistemic) you happen to have a raincoat, you should (deontic) bring one.
That last one used epistemic (=probability) should in the apodosis; so do these:
- If you will please lend me a raincoat, I should stay dry.
- If I have a raincoat, I should stay dry.
That sort of should expresses simply probability, not obligation. Using should in the first person in the epistemic mode is uncommon but possible:
- It you will kindly step this way, I should be delighted to help you.
The deontic sense (=obligation) of should can be found in the following examples, where the simple infinitive is used for non-past senses and the perfect infinitive for past senses:
Simple infinitive:
- If it were to rain, you should have a raincoat.
- If it rains, you should have a raincoat.
- If it rained, you should have a raincoat (with you already).
- If it has rained, you should have a raincoat.
- If it may rain, you should have a raincoat.
- If it might rain, you should have a raincoat.
- If it shall rain, you should have a raincoat.
- If you would keep dry, you should have a raincoat.
Perfect infinitive:
- If it rained, you should have had a raincoat.
- If it did rain, you should have had a raincoat.
- If it had rained, you should have had a raincoat.
The reason it works out this way, and therefore the answer to your question, is that there are just two ways of using should: one is with the simple infinitive for non-past senses, and the other is with the perfect infinitive for past senses.
This is nothing strange, because all modals work this way. They are themselves defective, so you cannot in general use them for conveying tense. You need to cast the infinitive they’re governing in the perfect to carry the tense.
Best Answer
Valid, but it means "If they are lying [as of now], ...". This is different from "If they lie, ...", which can be called the use of the generic present, which is not constrained to the past, present or future, because it can be used when referring to past speech, presently ongoing speech, or future speech. The present continuous "are lying" can only refer to speech up to the present (including ongoing speech).
Valid, but it means "If I decide to meet them, ...". I'm not sure why, but it could be because "am meeting" here refers to the point (possibly in the future) at which the decision to meet was made. Strangely, I cannot quite pin down the reason this does not apply to the previous example, but I've native speaker certainty.
Valid, but probably not in the context you want. The "would have gotten to know ..." states the definite outcome under a given possibility in the past, and so the "were meeting" has to denote such a possibility in the past. It cannot simply mean "If you [had] met them today", because then the meeting would be conceptualized as a single event. Instead it would probably mean "If they were the ones you were meeting today, ...".
Valid, and normal, because "had been talking with him" describes a possible past situation (of having been talking with him), under which it is claimed that "I would have told him". Note that it conveys a different meaning from "If I had talked with him, ..." which simply refers to the past event of talking with him.