The terms “before the fact” and “after the fact” are usually used in a legal sense, as in, accessory before the fact, (and similarly, accessory after the fact), to indicate a person aiding or abetting a crime before it is actually committed.
My question is, can these terms be used in a non-legal context, as in, for instance, learning before the fact, to imply something learned before its actual use is anticipated?
"Before the fact" appears rare, and I was only able to find a few examples:
We train ourselves how to survive before the fact. (HBR.org)
There are "before-the-fact" moral judgments, and there are "after-the-fact" moral judgments. (Moral Judgements)
a thorough investigation may uncover hazards or problems that can be eliminated "before-the-fact" for the future. (OH&S)
Notably, two of these put "before the fact" in quotation marks. It appears that "before the fact" is not invalid outside of a legal context, but it will be less familiar to the average speaker; "beforehand" or "in advance" are examples of more common alternatives.
"After the fact" is much more common – The Free Dictionary includes a few different citations of it outside a legal context.