pub fn pattern_contains_termname( pat: &Pattern, name: &str, termenv: &TermEnv, typeenv: &TypeEnv, ) -> bool
Check whether the pattern (the LHS term) contains a given term name, including in any subterms.