UNIVERSAL FIRST-ORDER LOGIC IS SUPERFLUOUS FOR NL, P, NP AND CO NP

. In this work we continue the syntactic study of completeness that began with the works of Immerman and Medina. In particular, we take a conjecture raised by Medina in his dissertation that says if a conjunction of a second-order and a ﬁrst-order sentences deﬁnes an NP-complete problems via fops, then it must be the case that the second-order conjoint alone also deﬁnes a NP-complete problem. Although this claim looks very plausible and intuitive, currently we cannot provide a deﬁnite answer for it. However, we can solve in the aﬃrmative a weaker claim that says that all “consistent” universal ﬁrst-order sentences can be safely eliminated without the fear of losing completeness. Our methods are quite general and can be applied to complexity classes other than NP (in this paper: to NLSPACE, PTIME, and coNP), provided the class has a complete problem satisfying a certain combinatorial property.


Introduction
Descriptive complexity studies the interplay between complexity theory, finite model theory and mathematical logic.Since its inception in 1974 [6], descriptive complexity has been able to characterize all the major complexity classes in terms of logical languages independent of any computational model, thus suggesting that the computational complexity of languages is a property intrinsic to them and not an accidental consequence of our choice for the computational model.
In descriptive complexity, problems are understood as sets of (finite) models which are described by logical formulas over given vocabularies, and reductions between problems correspond to first-order definable functions between the sets of models that characterize the problems.Like in structural complexity, reductions play a fundamental role in descriptive 2. Preliminaries 2.1.Logic.
2.1.1.Syntax.We consider logical vocabularies without functional symbols of the form σ = R 1 , . . ., R r , c 1 , . . ., c s where each R j is a relational symbol of arity a j ∈ Z + and each c i is a constant symbol.Throughout the paper, we assume that our logical languages contain the set {=, ≤, BIT, suc, 0, max} of fixed numeric relational and constant symbols, disjoint with σ [10].
First-order and second-order formulas over vocabulary σ are defined as usual [5].We follow most of the standard notational conventions found in [4,5,10].The set of all of the first-order (respectively second-order) formulas over vocabulary σ is denoted as FO(σ) (respectively SO(σ)).We write FO (respectively SO) to denote σ FO(σ) (respectively σ SO(σ)).In general if L is a logic, L(σ) denotes the set of all well formed formulas in L over the vocabulary σ.
An atomic formula over vocabulary σ has the form P (t 1 , . . .t k ) where P is a k-ary relational symbol (numeric or not) and t 1 , . . .t k are terms over σ.A literal is an atomic formula (and then we say it is positive) or the negation of an atomic formula (and then we say it is negative).A clause (respectively an implicant) is a disjunction A numeric formula in L(σ) is a formula without relational symbols from σ, and thus a numeric formula can mention constants from the vocabulary σ.Although counterintuitive, this notion guarantees that any non-numeric literal always refers to a relational symbol in σ, and also agrees with the notion given in [10,Def. 11.7] where a "numeric formula" is one where "no input relations occur".
If θ is a formula without quantifiers, we say it is in conjunctive normal form (CNF) (respectively disjunctive normal form (DNF)) if it is a conjunction (respectively disjunction) of clauses (respectively implicants).k-CNF (respectively k-DNF) is the class of all CNF (respectively DNF) formulas with at most k literals in each clause (implicant).These classes may be "tagged" with a vocabulary σ (e.g., k-CNF(σ)) when we talk about formulas over the vocabulary σ.Likewise, we define CNF k (σ) as the class of CNF formulas over σ whose clauses have at most k non-numeric literals, and similarly for DNF k (σ).
In general, we use lowercase Greek letters to denote first-order formulas and uppercase Greek letter to denote second-order formulas.We write ψ(x 1 , . . ., x m ) to emphasize that the free variables in ψ are among those in x 1 , . . ., x m .A tuple of variables such as x 1 , . . ., x m is written as x and its length m is denoted by |x|.A formula with no free variables is referred to as a sentence.Finally, we use Σ 0 k (σ) and Π 0 k (σ) to denote first-order formulas over vocabulary σ with k blocks of alternating quantifiers, beginning with an existential and universal quantifier respectively.For second-order formulas, we use the notations Σ 1 k (σ) and Π 1 k (σ) respectively.In all cases, when the vocabulary σ is clear from context, we drop it from the notation.
2.1.2.Semantics.Let σ = R 1 , . . ., R r , c 1 , . . ., c s be a vocabulary.The symbols in σ as well as the numeric symbols are interpreted by σ-structures.A (finite) σ-structure or just a structure, is a tuple where |A| is a symbol that denotes the universe (or domain) of A, each R A j ⊆ |A| a j is a a j -ary relation over |A| and each c j ∈ |A| is an element of |A|.The number of elements in the universe, size or cardinality of A is denoted by A .Following [10], we assume |A| to be an initial segment of size greater than 1 of the set of the natural numbers; i.e., |A| = [n] = {0, 1, . . ., n − 1} with n > 1.We say that R A j and c A j are the interpretations of the relational and constant symbols R j and c j in the structure A. On the other hand, the numeric symbols obtain the standard interpretations in the fragment [n] of the natural numbers [10]; e.g., the symbols '=' and '≤' are interpreted by the equality and non-strict natural order in N respectively, while the relational symbol BIT is interpreted by the binary relation BIT A given by (i, j) ∈ BIT A ⇐⇒ the j-th bit in the binary expansion of i is 1 , where the zeroth position is the least significant bit of i.The set of all the finite σ-structures is denoted by Struc(σ).
We follow the standard definition for the relation between structures and first-order formulas, and its extension to second-order formulas (see, e.g., [4,5,10]).These relations are defined in terms of the relation for pairs A, i and formulas ψ, where A is a structure and i is an interpretation of variables into the elements of A. If ϕ(x 1 , . . ., x m ) is a formula over the vocabulary σ, A ∈ Struc(σ), and a 1 , . . ., a m is a tuple over |A|, then A ϕ(a 1 , . . ., a m ) means that A, i ϕ for every interpretation i that maps x j into a j for 1 ≤ j ≤ m.In particular, when ϕ is a sentence, A ϕ iff A, i ϕ for every interpretation i.Given a vocabulary σ, we say that a σ-structure A is a model of sentence φ if A φ.The set of all the finite models of φ is denoted by Mod(φ); notice that Mod(φ) ⊆ Struc(σ).Similarly for second-order formulas.

Decision Problems and Complexity Classes.
A decision problem (or just problem) S is a subset of Struc(σ) for some fixed σ, which is closed under isomorphisms.For example, the problem ThreeDimensionalMatching (3dm) can be thought as the set of all structures A = |A|, M A over the vocabulary σ = M 3 , where M is a ternary relational symbol, such that M A contains a 3-dimensional matching; i.e., M A contains a set of triplets If S ⊆ Struc(σ) is a decision problem, then every finite σ-structure A is an instance and every element of S is a positive instance of S. We say that a Turing Machine M [7,13] decides a problem S if, given a suitable encoding of an instance A of S as input to M , M accepts the input iff A is a positive instance of S.
Decision problems are classified into complexity classes accordingly to their difficulty.We assume the standard computational resources (time and space) and computational modes (deterministic and non-deterministic) found in the literature [7,10,13].The most important complexity classes [10,13] are L, NL, P, NP and PSPACE.The following chain of inclusions is a well-known fact: L and NL are respectively the classes of all problems solvable by deterministic and nondeterministic Turing machines that use logarithmic space, P and NP are respectively the classes of problems solvable by deterministic and non-deterministic Turing machines in polynomial time, and PSPACE is the class of problems solvable by deterministic Turing machines that use polynomial space [7,10,13].Given a complexity class C, the class coC is the class of all problems whose complement is in C. For example, for a problem S ⊆ Struc(σ) in the class C, the problem S = Struc(σ)\S belongs to coC.Turing machines can also compute functions [13], and similar complexity measures apply to such functions.
A decision problem is typically characterized by a sentence over some logic L. 3dm, for example, is characterized by the sentence: in which the quantified ternary relation R denotes the 3-dimensional matching contained in the input instance whose triplets are given by M .Hence, if Φ 3dm is satisfied by a structure A, then the set of triplets M A that interpret the relational symbol M contains a 3-dimensional matching.Thus, the problem 3dm corresponds to the class Mod(Φ 3dm ) of finite σ-structures A such that A Φ 3dm .We also say that Φ 3dm defines 3dm in SO∃ and that 3dm is definable in SO∃.
In general, for a logical language L and complexity class C, we write C ≤ L if every problem in C is definable in the logic L. On the contrary, if Mod(φ) is a problem in C for every sentence φ in L, we write L ≤ C. If both L ≤ C and C ≤ L hold, we say that the logic L captures C and write L = C.The logic L captures the complexity class C over the class of structures K if for every problem A in C there is a sentence φ ∈ L such that Mod(φ) = A ∩ K and for every sentence φ ∈ L: It is known that SO∃ = NP [6], and SO∃-Horn = P and SO∃-Krom = NL over ordered structures [8].See the textbook of Immerman [10] for other characterizations and results.

2.3.1.
Reductions and Completeness.The idea of reduction is fundamental in complexity theory.Roughly speaking, we say that a problem S ⊆ Struc(σ) reduces to a problem T ⊆ Struc(τ ) if there is a function f : Struc(σ) → Struc(τ ) such that, for every σ-structure A, f (A) is a positive instance of T if and only if A is a positive instance of S; in such a case, we say that f is a reduction from S to T .Informally, this means that S is as hard to solve as T provided that f is relatively "easy" to compute.
Reductions are classified according to their computation complexity.If there is a function f of type r reducing S to T , the we write S ≤ r T and say that S reduces to T via r-reductions.Given a complexity class C we say that the problem T is C-complete via r-reductions if T belongs to C and S ≤ r T for every problem S in C. If the type of the reductions is clear from the context, we just say that T is C-complete.

2.3.2.
First-Order Projections.In this paper we are concerned with a very simple type of reduction that is definable in first-order logic and called first-order projections.We describe it in the following, but first need to define first-order queries.
The tuple I defines a mapping A → I(A), called a first-order query of arity k, from σ-structures into τ -structures.For given A ∈ Struc(σ), the map A → I(A) is given by: (1) Universe |I(A)| defined as |A| k (the k-tuples over |A|), (2) Relations R = ū for the unique ū with A ψ j (ū).If there is no such ū or there is more than one, the query is not well defined.Notice that we defined |I(A)| as |A| k .In order to keep our convention of |I(A)| being an initial segment of N, we identify it with the set {0, . . ., A k − 1} by lexicographically ordering |A| k .The numeric relations and constants in I(A) are defined in the standard way such that the numeric symbols obtain the intended interpretations.It is not difficult to show that the formulas defining the numeric predicates are all first-order formulas [10].Some authors consider mappings I extended with a formula ϕ 0 used to define the universe as |I(A)| = {ū ∈ |A| k : ϕ 0 (ū)}.This however causes difficulties when defining the interpretation of the numeric predicates as, in some cases, the formulas defining them cease to be first-order [10].For this reason, we do not consider such formulas ϕ 0 .
If S ⊆ Struc(σ) and T ⊆ Struc(τ ) are two problems, and the query I is such that A ∈ S iff I(A) ∈ T , then I is called a first-order reduction from S to T .A first-order query is called a first-order projection (fop) if each ϕ i , and each ψ j , has the form where the α k 's are numeric and pairwise mutually exclusive, and each λ k is a σ-literal.Two formulas α(x) and β(x) over vocabulary σ are mutually exclusive if, given any finite σ structure A and tuple ā ∈ |A| |x| , it holds A ¬α(ā) ∨ ¬β(ā).Projections are typically denoted by the letter ρ.If S is complete for the class C via ≤ fop reductions, then we say that S is C-complete via fops or simply C-complete.

Definitions and Basic Facts
This section contains most of the new definitions that we will need throughout the rest of the paper and some basic properties.We begin by extending Medina's notion of superfluity [11]: Definition 3.1 (Superfluity).Let σ and τ be two vocabularies, L be a logic and C be a complexity class captured by L.Then, (1) A sentence ψ in L is superfluous with respect to fop ρ : satisfies ψ for every finite σ-structure A. (2) A sentence ψ in L is superfluous with respect to L if for every sentence Φ in L: by L and L ′ is superfluous with respect to L.
We will use these definitions to successively break down the problem of showing that FO∀ is superfluous with respect to a complexity class like NP into the simpler problem of showing that an implicant ψ is superfluous with respect to a fop-reduction ρ.Indeed, the problem of showing that FO∀ is superfluous for NP is reduced to showing that FO∀ is superfluous for SO∃, that is again reduced to showing that every formula ∀xψ(x), where ψ(x) is in CNF r for some r, is superfluous for SO∃, which is ultimately reduced to showing that ψ(x) is superfluous with respect to a fop ρ.With the terminology offered in this definition, the conjecture at the beginning of this paper can be rephrased as saying that FO is superfluous with respect to NP.
In the following, we develop the notions of n-consistency of a formula and (n, k)uniformity of a subset of structures.These notions will play a fundamental role in our methods.
Definition 3.2.Let σ be a vocabulary, ϕ(x) be a formula in FO(σ), n be a natural number, and ū ∈ [n] |x| be a tuple of natural numbers.We say that ϕ(x), ū is n-consistent if there is a σ-structure A with A = n such that A ϕ(ū).If S is a subset of finite σ-structures, we sat that ϕ(x), ū is n-consistent in S if there is a σ-structure A in S with A = n such that A ϕ(ū).When there is no risk of confusion, we abbreviate by just saying that ϕ(ū) is n-consistent (in S).
1 , . . ., R as s , c 1 , . . ., c t be a vocabulary, and S be a subset of finite σ-structures.Let n and k be two natural numbers.We say that S is (n, k)-uniform iff for • every integer m ≥ n and non-negative integers p and q such that p + q ≤ k, • every sequence L 1 ( t1 ), . . ., L p ( tp ) of σ-literals, • every sequence ū1 , . . ., ūp of tuples with ūj ∈ [m] | tj | for 1 ≤ j ≤ p, • every sequence c t 1 , . . ., c tq of constant symbols in σ, and • every sequence b 1 , . . ., b q of integers with b j ∈ [m] for 1 ≤ j ≤ q, the following holds: The following properties follow directly from the definition.
Finally, we provide some examples of (n(k), k)-uniform problems, where k ranges over positive integers and n(k) is an increasing function from Z + to itself: Lemma 3.5.For every positive integer k: Here, Reach and AltReach refer to graphs G in which there is a path from a designated vertex s to a designated vertex t, the difference among the two problems being that the first refers to regular graphs while the second to alternating graphs.An alternating graph is a directed graph whose vertices are partitioned into universal and existential.The accessibility relation or alternating paths are defined as follows.Any vertex u is accessible from itself.If u is an existential vertex, there is an edge (u, v) and w is a vertex accessible from v, then w is accessible from u. Finally, if u is an universal vertex, there is at least one edge leaving u and w is accessible from every vertex v such that (u, v) is an edge, then w is accessible from u.
0m-HP refers to graphs in which there is a Hamiltonian path between the vertex denoted by the constant 0 and the vertex denoted by the constant max.coMonoTriangle is the complement of the problem MonochromaticTriangle; i.e., coMonoTriangle consists of all graphs G for which every 2-coloring of the edges of G contains a monochromatic triangle.Formal definitions for these problems are provided in the Appendix.
Proof.Case 1. Reach is defined with the vocabulary σ = E, s, t where E a binary relation and s, t are two constant symbols.Let ϕ be an implicant formula like the one in Definition 3.3 that has at most k literals.Such a formula postulates the presence/absence of at most k edges in the graph encoded by a given σ-structure.The idea of the proof is to construct a path from s to t by adding two new edges (s, a ′ ) and (a ′ , t) for a vertex a ′ that is not referred to by the formula ϕ, which exists since the graph is assumed to have 2k + 1 vertices and ϕ can refer to at most 2k different vertices.Formally, notice that that ϕ has at most 2k free-variables that we denote by x and write ϕ(x).Let k ≥ 0 and m ≥ 2k + 1 be two integers and consider a sequence ā of 2k integers in be an integer not contained in the sequence ā, which exists since m ≥ 2k + 1.Then, the structure Case 2. AltReach is defined with the vocabulary σ = E, U, s, t where E denotes the edges of the graph and U is a unary relation denoting the universal vertices.As before, let ϕ be an implicant with at most k literals.Such a formula refers to at most 2k vertices and thus can be written as ϕ(x) where |x| = 2k.Let k ≥ 0 and m ≥ 2k + 1 be two integers and consider a sequence ā of 2k integers in [m] such that ϕ(ā) is m-consistent.Let A = [m], E A , U A , s A , t A be a minimum σ-structure of size [m] that satisfies ϕ(ā), where the minimum is with respect to the sizes of E A and U A (i.e., A satisfies ϕ(ā) but if some edge from E A or some vertex from U A is removed, then A ceases to satisfy ϕ(ā)).It is not hard to see that in the graph encoded by A, there are at most 2k vertices connected to s through simple (non-alternating) paths.Let a ′ be an integer in [m] not contained in ā.We form a new structure A ′ that is like A but with the additional edges It is not hard to see that A ′ satisfies ϕ(ā) and has an alternating path connecting s to t.The latter because every vertex a i connected to s through a simple path in A is connected to t through an alternating path, which then implies that every such vertex a i and s itself is connected to t through an alternating path.Therefore, AltReach is (2k + 1, k)-uniform.
Case 3. 0m-HP is defined with the vocabulary σ = E consisting of a single binary relation symbol E. As before, the formula ϕ refers to at most 2k vertices and can be written as ϕ(x) with |x| = 2k.Let k ≥ 0 and m ≥ 4k be two integers and consider a sequence ā of 2k integers in [m] such that ϕ(ā) is m-consistent.Let A = [m], E A be a σ-structure satisfying ϕ(ā).We need to construct a structure A ′ of the same size that also satisfies ϕ(ā) and has a Hamiltonian path between 0 and max = m − 1.
Let V = {a 1 , a 2 , . . ., a 2k } \ {0, m − 1} be the set of unique elements in the sequence ā except 0 and m − 1.The set V has ℓ ≤ 2k elements and thus we can pick another ℓ elements V ′ = {c 1 , . . ., c ℓ } such that V ∩ V ′ = ∅.We construct A ′ like A but add edges so to construct the path 0c 1 a ′ 1 c 2 a ′ 2 . . .c ℓ a ′ ℓ that begins at 0 and does not repeat any vertex.This path contains 2ℓ + 1 ≤ m vertices.If there are vertices w 1 , . . ., w q in [m] that do not lie on the path, the path can be "completed" into a Hamiltonian path joining 0 and m − 1 of the form . This path contains all the elements in [m] and does not violate any of the conditions imposed by ϕ(ā).Therefore, there is a positive instance of 0m-HP that satisfies ϕ(ā), and 0m-HP is thus (4k, k)-uniform for every k ≥ 0.
Case 4. coMonoTriangle is also defined with the vocabulary σ = E .Consider a formula ϕ(x) as the above for 0m-HP.Let k ≥ 0 and m ≥ 2k + 6 be two integers and consider a sequence a 1 , . . ., a 2k of integers in [m] such that ϕ(ā) is m-consistent.Let A = [m], E A be a σ-structure satisfying ϕ(ā).Since m ≥ 2k + 6, there are 6 vertices {u 0 , . . ., u 5 } that are not mentioned in ā.Then, the structure is a structure that satisfies ϕ(ā).However, A ′ encodes a graph G that has a complete subgraph of order 6 and therefore every 2-coloring of the edges of G contains a monochromatic triangle1 and A ′ belongs to coMonoTriangle.Hence coMonoTriangle is (2k + 6, k)-uniform for every k ≥ 0.
Notice that (n, k)-uniformity is not preserved under complementation.For example, it is easy to see that MonoTriangle is not (n, k)-uniform for any pair of natural numbers (n, k) with k ≥ 15 since, by a result of Ramsey [9], no graph in MonoTriangle satisfies {E(i, j) : 0 ≤ i < j ≤ 5}.

Main Result
In this section we state and prove the main result of this paper which, among other things, implies the superfluity of FO∀ with respect to NP. Basically, the result says that if a complexity class C contains a family of complete problems that are (n, k)-uniform for increasing values of k, plus other conditions, then FO∀ is superfluous with respect to C. The proof is a direct consequence of a series of results that are presented in the form of one proposition and two lemmas.The proposition is a standard result in logic whose proof is left to the reader.It is used in the proof of Lemma 4.2 to show that a numeric formula γ(x) holds in a structure A ′ when it holds in a structure A of the same size and with the same interpretation for the constant symbols.Remember that a numeric formula is one with no relation symbols from the vocabulary.Proposition 4.1.Let σ be a vocabulary with constants c 1 , . . ., c t and ϕ(x) ∈ FO(σ) be a numeric formula.If A and A ′ are two finite σ-structures of the same size and c A j = c A ′ j for every 1 ≤ j ≤ t, then for every interpretation of variables i: The following two lemmas are novel and related to the concepts of consistency and uniformity presented above.The first establishes the consistency of the image (of a fop ρ) for a uniform subset S of structures with respect to formulas ψ(x) that are implicants.This result is then used in the second lemma to establish that FO∀ formulas ψ = ∀xθ(x) are superfluous with respect to reductions ρ that map a uniform subset S into Mod(Φ ∧ ψ) for any sentence Φ. Lemma 4.2.Let σ and τ = R 1 , . . ., R s , c 1 , . . ., c t be two vocabularies where each R j is an a j -ary relation symbol and σ has constants {c ′ 1 , . . ., c ′ t ′ }, and let n ≥ 0 and k ≥ t + t ′ be two non-negative integers.Further, let H1: ρ : Struc(σ) → Struc(τ ) be a d-ary fop given by the tuple ϕ 1 , . . ., ϕ s , ψ 1 , . . ., ψ t consisting of projective formulas, H2: S ⊆ Struc(σ) be an (n, k)-uniform subset of σ-structures, H3: ψ(x) be a DNF k−t−t ′ (τ ) implicant, H4: A be a finite σ-structure with A ≥ n, and H5: ū be a tuple of elements from |ρ(A)| such that ρ(A) ψ(ū).Then, there is a structure A ′ in S with A = A ′ such that ρ(A ′ ) ψ(ū).
Proof.The strategy for the proof is as follows.First, we give a claim that relates statements about ρ(A) in terms of statements about A, and vice versa.Second, we use the claim to construct a formula δ(x) and tuple ā over |A| such that A δ(ā) iff ρ(A) ψ(ū) plus conditions that guarantee that the constants are interpreted in the same way in the structures A and A ′ , and in ρ(A) and ρ(A ′ ) respectively.Third, we use the uniformity of S to obtain a structure A ′ ∈ S that satisfies δ(ā).Finally, we use the claim again, but applied to the structure A ′ , to show ρ(A ′ ) ψ(ū).
For the claim, recall that the mapping B → ρ(B) is defined by the projective formulas that define the interpretations in ρ(B) of the relation and constant symbols in τ ; i.e., ρ(B) R j (ā) iff B ϕ j (ā) where ā is a tuple in |B| da j (because ρ has arity d and R j has arity a j ), and ρ(B) c j = w iff B ψ j ( w) where w is a tuple in |B| d .So, whether we are dealing with formulas interpreted in B or ρ(B), the tuples ā are always over elements in |B|.
We now use the claim to prove the lemma.The proof of the claim appears at the end of this proof.
By H3, the implicant has form ψ Let us apply the Claim to these entailments and the tuple ū to obtain the formulas µ 1 (ȳ), µ 2 (ȳ), . . ., µ m (ȳ) 2 This claim is a special case of a more general result expressed in terms of the dual operator associated with a first-order query [10].
. By collecting the numeric subformulas in the µ j 's into a single numeric formula β(ȳ), we obtain where each λ j is a non-numeric σ-literal for 1 ≤ j ≤ ℓ with ℓ ≤ m.At this stage, we can apply the uniformity of S to obtain a structure A ′ ∈ S satisfying λ j (ū) for 1 ≤ j ≤ ℓ; yet this is not enough as we also require A ′ β(ū) and ρ(A ′ ) θ(ū).However, Proposition 4.1 can help us provided that A and A ′ interpret the constants in the same way, and the same for ρ(A) and ρ(A ′ ).
So, consider the tuples v1 , . . ., vt that interpret the constant symbols c 1 , . . ., c t in ρ(A).Applying the claim again to the formulas c j = vj in the image ρ(A) and the tuple v = v1 , . . ., vt , we obtain a numeric formula β(v) and non-numeric σ-literals λ1 (v 1 ), . . ., λℓ Thus, apply the (n, k)-uniformity of S to obtain a structure A ′ ∈ S with A ′ = A and such that In particular, A and A ′ have the same interpretation for the constants {c ′ 1 , . . ., c ′ t ′ } and thus, by Proposition 4.1, A ′ β(ū) ∧ β(v).On the other hand, a new application of the claim but using the structure A ′ , gives us The latter implies that ρ(A) and ρ(A ′ ) have the same interpretation for the constants {c 1 , . . ., c t }.By Proposition 4.1, ρ(A ′ ) θ(ū) as well.Therefore, ρ(A ′ ) ψ(ū) as needed.
Proof.Assume that θ(x) = 1≤i≤m θ i (x) where each θ i is a clause of the form , where β i is a disjunction of numeric literals and L i 1 (x), . . ., L i m i (x) are non-numeric literals with m i ≤ r.We want to show that ρ(A) ∀xθ(x) for every A ∈ Struc(σ).Let us consider two cases: Assume, for the sake of a contradiction, that ρ(A) ψ.So, there is a clause θ i (x) and a tuple ū ∈ |ρ(A)| |x| such that ρ(A) θ i (ū); i.e., where γ(x) ≡ ¬β i (x) is a conjunction of numeric literals, and each λ j (x) ≡ ¬L i j (x) is a non-numeric literal.At this moment, all the hypotheses of Lemma 4.2 are satisfied and thus there is a finite σ-structure . Hence, ρ(A ′ ) does not satisfy ψ.This is a contradiction since A ′ ∈ S and ρ reduces S to Mod(Φ ∧ ψ).Therefore, ρ(A) ψ.Proof.Direct since for every structure A ∈ Struc(σ), ρ(A) ψ.
We now define what is a complete and uniform family of problems for a class C, and state and prove the main theorem of the paper.Definition 4.6.A family F of problems over vocabulary σ = R 1 , . . ., R s , c 1 , . . ., c t is complete and uniform for a complexity class C if 1) every problem in F is C-complete, and 2) there is a sequence {n k } k≥0 and a natural number m such that for every k ≥ m there is a (n k , k)-uniform problem S n k in F that contains all the structures A ∈ Struc(σ) with A < n k .Proof.Let τ be a vocabulary and ψ be a FO∀-sentence on τ .It is enough to prove that ψ is superfluous with respect to L since ψ is an arbitrary sentence.First notice that ψ can be written in prenex normal form with a quantifier-free part in CNF r for some r ∈ N. Let Φ ∈ L(τ ) be a sentence such that Mod(Φ ∧ ψ) is C-complete.Let t be the number of constant symbols in the vocabulary σ for the family F, k = r + t + t ′ where t ′ is the number of constant symbols in τ , and {n k } k≥0 and m be the sequence and natural number for F. If k ≥ m, there is a problem S n k ∈ F that is (n k , k)-uniform, C-complete, and contains all the structures A ∈ Struc(σ) with A < n k .Then, there is a fop ρ that reduces S n k to T .Thus, all the hypotheses in Lemma 4.4 are fulfilled and therefore Mod(Φ) is C-complete by Corollary 4.5.The case k < m is covered by the case k = m since (n k , k)-uniformity implies (n k , k − 1)-uniformity according to Lemma 3.4.
4.1.Superfluity of FO∀ for Some Complexity Classes.We have seen that 0m-HP is (4k, k)-uniform for every k ∈ N, but it easy to see that it has negative instances of every size and thus the Theorem 4.7 cannot be applied directly.Hence, we make the following definitions: Definition 4.8.If S is a problem over σ, we define for each n ∈ N: and the family of problems F(S) := {S n } n≥2 .
We will also use another property.The notion of autoreducibility is well known [2].We can translate it in the context of fops by saying that a problem is autoreducible if there is a reduction from it to itself different than the identity.We need autoreducible sets with an extra requirement on the cardinalities of the image structures: Definition 4.9.Given a vocabulary σ and a natural number n, a set S ⊆ Struc(σ) is n-autoreducible if there is a fop ρ : Struc(σ) → Struc(σ) which reduces S to itself and such that ρ(A) > n for every A ∈ Struc(σ).
It is immediate to see that the problem S n is C-hard if S is C-hard and n-autoreducible.Proof of Theorem 4.10.We begin showing that the families F(Reach), F(AltReach), F(0m-HP) and F(CoMonoTriangle) are uniform.By Lemma 3.5, the problems in F(Reach) and F(AltReach) are (2k + 1, k) uniform, the problems in F(0m-HP) are (4k, k)-uniform, and the problems in F(CoMonoTriangle) are (2k + 6, k)-uniform for every integer k ≥ 0. Thus, it is easy to these that these families are uniform: for F(Reach) and F(AltReach) the sequence is {2k + 1} k≥0 , for F(0m-HP) the sequence is {4k} k≥0 , and for F(coMonoTriangle) the sequence is {2k + 6} k≥0 .In all cases, m = 1.
It remains to show that the families are complete; i.e., that every problem in the families F(Reach), F(AltReach), F(0m-HP) and F(CoMonoTriangle) is complete for the classes NL, P, NP and coNP respectively.That is, that every problem belongs and is hard for the respective complexity class.
Let us first show that each problem in the above families belongs to the respective complexity class.Consider the family F(S) where S is a problem in a complexity class C captured by the logic L with FO ⊆ L. There is a sentence Φ ∈ L such that S = Mod(Φ).On the other hand, given integer n ≥ 0, we have a FO-sentence ζ n such that A ζ n ⇐⇒ A < n.Thus, Φ ∨ ζ n defines S n and, since FO ⊆ L, Φ ∨ ζ n ∈ L and S n belongs to C. Therefore, every problem in F(S) belongs to C. Since the logics that capture the classes NL, P, NP and coNP all include FO, then each problem in each family belongs to the respective complexity class.
The hardness for each problem in the families F(S), when S is Reach, AltReach, 0m-HP or coMonoTriangle, follows from the facts that S is hard for its complexity class and that S is n-autoreducible for each integer n ≥ 0. We begin by showing the latter fact.That is, given integer n ≥ 0, we need to construct a fop-reduction ρ such that the image ρ(A) has a universe of size greater than n.The reduction in all cases essentially consists of padding the original structure to obtain a new one with the desired size.Given an integer n ≥ 0 we let k be the least natural number such that 2 k > n.The integer k will be the arity of the fop ρ in each case.
AltReach is defined over the vocabulary σ = E, U, s, t where E and U are a binary and monadic relations denoting the edges and universal vertices in the graph, and s and t are constant symbols denoting designated vertices.In this case the reduction simply adds as much disconnected vertices as necessary.
If A = |A|, E A , U A , s A , t A is a finite σ-structure.The image of A is the finite structure ρ(A) defined as follows: it should be clear that ρ is a reduction since A contains an alternating path from s to t iff ρ(A) contains one.The projection reducing Reach to Reach n is almost the same but without any reference to universal vertices.
In the case of F(0m-HP) given a strucure A its image ρ(A) consists of k copies of A with edges joining the vertex corresponding to max in the j-th with the vertex corresponding to 0 in the j + 1-th copy with j < n.There are no other edges connecting different copies of A. It is clear that ρ(A) will have a Hamiltonian path joining the vertices 0, . . ., 0 and max, . . ., max iff there is a Hamiltonian path joining 0 and max in A For coMonoTriangle it is enough to have the A k−1 copies of the input structure without connecting them.Since they are all different connected components of ρ(A), a 2-coloring of the edges in ρ(A) is just a combination of 2-colorings of the edges in A and ρ(A) is a positive instance of CoMonoTriangle if and only if A is.
We finish the proof of the theorem by showing that each of the problems is complete for its complexity class.We already know that Reach is NL-complete, AltReach is P-complete [10,Corollary 11.3] and coMonoTriangle is coNP-complete since Mono-Triangle is NP-complete [11,7].It remains to show that 0m-HP is NP-complete.For the inclusion, notice that 0m-HP can be defined in SO∃ by stating a total ordering of the vertices such that any two consecutive vertices in the ordering form an edge in the graph and with the first and last element in the ordering being 0 and max respectively.For the hardness, it is enough to reduce the similar 01-HP problem (known to be NP-complete [1]) to 0m-HP with a projection that interchanges 1 with max.

Applications
We show two applications of the superfluity of FO∀.In the first application, we establish the NP-completeness of the problem LongestPath for determining the existence of a path between two designated vertices s and t of length bigger than a given threshold K.In the second application, we show that establishing the completeness of a property for undirected graphs is enough for establishing the completeness of the same property for directed graphs.Up to our knowledge, these are novel results in the area.
Before giving the proof of the theorem, let us define some terminology.Let S be a problem where each instance includes a function f defined from the set of k-tuples of elements in the universe to the non-negative integers.If σ is the vocabulary used to define S, we say that a k + 1-ary relation symbol F in σ is the binary expansion of f if, given a finite σ-structure A and a k-tuple ā ∈ A k : (a 1 , . . ., a k , i) ∈ F A ⇐⇒ the i-th bit in the binary expansion of f (ā) is 1.
Proof.LongestPath is known to be in NP [7], hence there is a SO∃ sentence Φ LP for it over the vocabulary σ = L 3 , E 2 , K 1 , s, t , where L defines the binary expansion of the lengths of the edges, E is the edge relation and K defines the binary expansion of the bound on the total length for a path joining s and t.
Consider the FO∀ sentence ψ = ψ 1 ∧ ψ 2 where Then a finite σ-structures A is a model of the sentence Φ = Φ LP ∧ ψ if and only if every edge of A has length 1 and there is a path from s A to t A with total length at least max.Since max = A − 1 and every edge has length 1, the path joining s and t must be Hamiltonian.Therefore Φ = Φ LP ∧ ψ defines HamiltonianPathBetweenTwoPoints (which is NP-Complete [1]) and Φ LP defines an NP-complete problem because ψ is superfluous for NP.
The second application considers directed and undirected versions of problems on graphs.If S ⊆ Struc( E 2 ) is a problem over undirected graphs, we say that S is the version over directed graphs of S if there is a sentence Φ such that S = Mod(Φ) and S = Mod(Φ ∧ ψ) where ψ ≡ ∀xy E(x, y) −→ E(y, x).In such case, if S is C-complete for a class C for which FO∀ is superfluous, then S is also C-complete.Theorem 5.2.If FO∀ is superfluous with respect to class C and S is a C-complete problem over undirected graphs, then its version over directed graphs is C-complete as well.

Discussion
We gave a partial affirmative answer to Conjecture 1.1 by proving that the universal fragment FO∀ is superfluous with respect to NP.This is a consequence of Theorem 4.7 which also implies that FO∀ is superfluous with respect to NL, P and coNP.Our method is fairly general and it is based on the (n, r)-uniformity concept which is new, as far as we know.On the other hand, we extended the previous concept of superfluity [11] to complexity classes (and languages) beyond NP.
In one application of these results, the superfluity of FO∀ allows to give syntactic proofs for NP-completeness if one can find a suitable restriction of the problem that is expressible with a FO∀ sentence and already known to be complete (cf.Theorem 5.1).In another application we show that the directed versions of any NP-complete problem on undirected remain NP-complete.
In the future, we want to continue this research with the aim of proving Medina's conjecture in its full generality, which we believe to be true.On the other hand, one can think in generalizations and related versions of this conjecture.For example, a more general conjecture is the following: Conjecture 6.1.Let L and L ′ be two logics capturing classes C and C ′ respectively and such that L ′ ⊆ L, and let Φ ∈ L and Φ ′ ∈ L ′ be two sentences.Then, This conjecture reduces to Medina's when L ′ is FO∀ and AC 0 (languages recognized by circuits of polynomial size, constant depth and unbounded fan-in) is known to be strictly included in C.
Another direction is to use the concept of complete and uniform families to separate complexity classes.That is, if C and C ′ are two complexity classes such that C ⊆ C ′ and C ′ contains a complete and uniform family F but C does not contain such a family, then it must be the case that the two classes are different.
The converse of Medina's conjecture is also interesting.In general, we know that the completeness of Mod(Φ) does not necessarily imply the completeness of Mod(Φ∧ψ).Indeed, it is enough for ψ to be inconsistent to see this or, for example, consider the case of SAT and 2SAT in which the first is NP-complete while the second is in P and not believed to be NP-complete, yet 2SAT can be expressed as Mod(Φ SAT ∧ ψ) for a suitable choice of ψ where Φ SAT defines SAT.However, an interesting question is what syntactic characteristics must have ψ ∈ FO in order for the C-completeness of Φ to be preserved by the conjunction Φ ∧ ψ.
Finally, there is a clear relation between the concept of (n, r)-uniformity and Ramseytype problems.Let S be a (n, r)-uniform class of graphs defined over the vocabulary E 2 and m ≥ n.Then, a sequence {L j (x j , y j )} 1≤j≤r of literals together with a sequence {(a j , b j )} 1≤j≤r of different pairs from [m] 2 , with a j = b j for 1 ≤ j ≤ r, can be interpreted as a partial 2-coloring on the edges of K m , the complete graph on m vertices, by considering the edge (u, v) to be colored red or blue whether E(u, v) or ¬E(u, v) belong to the sequence of literals respectively.Since S is (n, r)-uniform, there there is a coloring c of the edges of K m such that the subgraph consisting of all the m vertices but only the red edges belongs to S. This connection may prove useful when giving a definite answer to Medina's conjecture.

Corollary 4 . 5 .
With the same hypotheses of Lemma 4.4, the fop ρ reduces S to Mod(Φ).Hence, if L captures C and S is C-complete, then Mod(Φ) is C-complete.

Theorem 4 . 7 (
Main).Let C be a complexity class captured by L with FO ⊆ L. If C contains a complete and uniform family F, then FO∀ is superfluous with respect to C.

Theorem 4 .
10. F(Reach), F(AltReach), F(0m-HP) and F(CoMonoTriangle) are complete and uniform families for NL, P, NP and coNP respectively.Then, as a consequence of Theorems 4.7 and 4.10: Corollary 4.11.FO∀ is superfluous with respect to NL, P, NP, and coNP This corollary answers Conjecture 1.1 for FO∀ instead of FO.