Hyperalgebras with Applications to Universal Algebra, Lambda Calculus and Mathematical Logic Part II The class of hyperalgebras forms a variety of algebras of type (0, 0, ..., 2, 3, 4, ...)  in the sense of universal algebra, therefore free hyperalgebra T(F) over any nonempty set F (of functional variables) exists. The construction of T(F) given below is very simple, which leads to a canonical definition of hyperidentities. Let T(F) be the smallest set containing X = {x_1, x_2, ...} and F such that if f is in M and M1, ,,,, Mm are in T(F) thenf[M1, ,,,, Mm] = f[M1, ..., Mm, Mm, ...]  is in T(F), where f[M1, ,,,, Mm]  is viewed as an abbreviation of f[M1, ..., Mm, Mm, ...].  Thus we have f[M1, ,,,, Mm] = f[M1, ..., Mm, Mm]. Define M[N1, ..., Nn] in T(F) inductively on M: 1. xi[N1, ..., Nn] = Ni if i < n + 1 and xi[N1, ..., Nn] = Nn otherwise.2. f[N1, ..., Nn]  =  f[N1, ..., Nn , Nn ...] for any f in F. 3. (f[M1, ,,,, Mm])[N1, ..., Nn] = f[M1[N1, ..., Nn], ..., Mm[N1, ..., Nn]]. Then it is easy to see that T(F) is a free hyperalgebra over F. Definition. A hyperidentity is an equation M = N with terms M, N in T(F). We say M = N is a finitary hyperidentity if M, N are finitary elements of T(F). We say a hyperalgebra A satisfies a hyperidentity M = N (or M = N is a hyperidentity of A) if P(M) = P(V) for any homomorphism P: T(F) -> A. We say a variety V satisfies a hyperidentity M = N (or M = N is a hyperidentity of V) if the free algebra T(V) in V over X satisfies the hyperidentity M = N. To simplify notations we often let  x = x1, y = x2, z = x3, ...  The functional variables in F will be denoted by f, g, h, ... Example. The variety of lattices satisfies the following finitary hyperidentities:  a. f[x, x] = x. b. f[f[x, y], y] = f[x, y]. c. f[f[x, y], z] = f[x, f[y, z]]. If E is a set of hyperidentities denote by Hyp(E) the class of hyperalgebras satisfying each hyperidentity of E. A class K of hyperalgebras is called equationally definable if there is a set E of hyperidentities such that K = Ha(E). If K is a class of hyperalgebras denote by HidF(K) the class of hyperidentities in T(F) satisfied in every hyperalgebra of K. Then HidF(K) is a fully invariant congruence relation in the free hyperalgerbra T(F). Clearly if K consists of finitary hyperalgebras then HidF(K) is generated by finitary hyperidentites. Definition. 1. A class K of hyperalgebras is called a hypervariety if it is closed under the formation of subalgebras, homomorphic images, and direct products. 2. Let F = {f1, f2, ...}. A subset E is called a hypertheory if E = HidF(K)  for some class of hyperalgebras. The class of hypervarieties forms a complete lattice under intersection. We say a variety V belongs to (resp. generates) a hypervariety if the hyperalgebra T(V) belongs to (resp. generates) the hypervariety. We say that a hypervariety is locally finitary if it is generated by finitary hyperalgebras. Theorem (Birkhoff's Theorem) 1. A class of hyperalgebras is equationally definable iff it is a hypervariety.2. The complete lattice of hypervarieties is dually isomorphic to the complete lattice of hypertheories. Remark. Assume (F, α) is any algebraic similarity type, where F is a nonempty set and α is an arity function which assigns to each f in F a positive integer α(f). Then the term algebra W(F) of type (F, α) over X is naturally a finitary hyperalgebra because it is the free algebra of type (F, α) over X. The hyperlagebra W(F) may be viewed as a finitary subalgebra of T(F) generated by the subsets { f[x1, ..., xn] | f is in F with arity n}. Thus an identity M = N with terms in W(F) may be viewed as a finitary hyperidentity in T(F). Since W(F) is a retraction of T(F), any homomorphism from W(F) to a hyperalgebra A extends to a homomrophism from T(F) to A. It follows that A satisfies a hypervariety M = N in T(F), where M, N are in  W(F), iff P(M) = P(N) for any homomorphism P: W(F) -> A. Now any homomorphism P: W(F) -> A is uniquely defined by a function p: F -> A such that p(f) has a finite rank n for any f in F with arity n. Since any finitary hyperidentity in T(F) may be viewed as a hyperidentity in W(F) for a suitable algebraic similarity type (F, α), we see that our approach to the theory of hyperidentity is equivalent to the tradition approach given in literature. Part I  II  III