Strengthening by unification › Can’t we look at free variables? [01KU]
People who, shall we say, have no idea what they are doing tend to think that strengthening is an easy problem to solve: just calculate the set of free variables! (Go grep your favourite proof assistant’s implementation for free variable checks; I’ll wait.)
The problem with this approach is that it is not stable under definitional equivalence: in the simplest case, a dependency can be removed by \beta -reduction. That’s not hard to deal with, of course, but there are still \eta -laws to contend with. You might think that you could contend with the latter by filtering the set of free variables to remove those that are definitional singletons (like the Unit type, or powers thereof). That will also not work, because you need to consider the way the variable is used: for example, x : Unit * Nat is not irrelevant, but it is used irrelevantly in x.pi1.
In the end, if you insist on computing free variable sets for whatever misguided or confused reason, the only non-broken way to do so is to compute it only on the \beta -short \eta -long normal form. But we all know that nobody is doing this…