Example of definition dummies which leads to illegal variable assignment

Here's an example of trying to prove something which might look like it applies a definition validly, but does not involve a consistent assignment of variables, and is thus not a valid proof.

The easiest way to get some kinds and terms to work with is going to be to import one of our existing interfaces; here we pick Interface:Classical_propositional_calculus.  import (PROPOSITIONAL Interface:Classical_propositional_calculus ) 

Here's a definition with a dummy variable (because  is found on the right hand side, but not the left hand side, of the definition).  var (formula p) def ((truth) (p ∨ (¬ p))) 

If we are supposed to prove  it suffices to prove   (see Tautology) but it is not sufficient to prove.

The error is based on the idea that, when expanded, has two different variables on the two halves of the implication, but invoking   expands the variable and then produces an expression with  the same variable in both places.

 thm (Invalid  ((p ∨ (¬ p)) ↔ (truth)) ( (truth) BiconditionalReflexivity )) 