Checking if all the variables are present in the defined function
Using an undocumented function:
Reduce`FreeVariables[u] === Sort[vas]
Update
Following your updated question I recommend filtering Level
output with Variables
as I proposed here. Then Sort
vas
and check for equivalence.
Sort[vas] === Variables @ Level[u, {-1}]
Original proposals
The first idea that came to mind:
Level[u, {-1}] ⋂ vas === Sort[vas]
Equivalently:
Complement[vas, Level[u, {-1}]] === {}
A method using FreeQ
Nor @@ Through @ Map[FreeQ][vas][u]
Or without version 10 Operator Forms:
Nor @@ Through @ (FreeQ /@ vas)[u]
Another undocumented function: Internal`LiterallyOccurringQ
:
And @@ (Internal`LiterallyOccurringQ[u, #] & /@ vas)
True
And @@ (Internal`LiterallyOccurringQ[u, #] & /@ {x, y, t})
False