The GEN_ABS function is, semantically at least, a derived rule that
combines applications of the primitive rules ABS and MK_COMB.
When the first argument, a term option, is the value NONE, the
effect is an iterated application of the rule ABS (as per List.foldl. Thus,
G |- x = y
-------------------------------------------- GEN_ABS NONE [v1,v2,...,vn]
G |- (\v1 v2 .. vn. x) = (\v1 v2 .. vn. y)
If the first argument is SOME b for some term b, this term b is
to be a binder, usually of polymorphic type :('a -> bool) -> bool.
Then the effect is to interleave the effect of ABS and a call to
AP_TERM. For every variable v in the list, the following theorem
transformation will occur
G |- x = y
------------------------ ABS v
G |- (\v. x) = (\v. y)
---------------------------- AP_TERM b'
G |- b (\v. x) = b (\v. x)
where b' is a version of b that has been instantiated to match the
type of the term to which it is applied (AP_TERM doesn’t do this).