что такое граунд и линеар
In a matching problem s ≈α t, t is ground (i.e., it has no variables), or, more generally, it has variables that cannot be instantiated. When the term t is ground we say that the matching problem is ground. The left-hand side of a matching problem s ≈α t is called a pattern, and may have variables occurring multiple times. When each variable occurs at most once in patterns we say that the matching problem is linear.