{'fraction_non_alphanumeric': 0.04135424762196657, 'fraction_numerical': 0.006939807568111913, 'mean_word_length': 4.205287448008661, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 51, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Learning implicitly in reasoning in PAC-Semantics

We consider the problem of answering queries about formulas of propositional logic based on background knowledge partially represented explicitly as other formulas, and partially represented as partially obscured examples independently drawn from a fixed probability distribution, where the queries are answered with respect to a weaker semantics than usual -- PAC-Semantics, introduced by Valiant (2000) -- that is defined using the distribution of examples. We describe a fairly general, efficient reduction to limited versions of the decision problem for a proof system (e.g., bounded space treelike resolution, bounded degree polynomial calculus, etc.) from corresponding versions of the reasoning problem where some of the background knowledge is not explicitly given as formulas, only learnable from the examples. Crucially, we do not generate an explicit representation of the knowledge extracted from the examples, and so the"learning"of the background knowledge is only done implicitly. As a consequence, this approach can utilize formulas as background knowledge that are not perfectly valid over the distribution---essentially the analogue of agnostic learning here.


Introduction
PAC-Semantics was introduced by Valiant [51] in an attempt to unify statistical and logical approaches to reasoning: on the one hand, given background knowledge represented as a collection of axioms, one may perform logical deduction, and on the other hand, given background knowledge represented as a collection of examples, one can derive a statistical conclusion by testing whether the conclusion is supported by a sufficiently large fraction of the examples. PAC-Semantics captures both sources. As is typical for such works, we can illustrate the utility of such a combined approach with a story about an aviary. Suppose that we know that the birds of the aviary fly unless they are penguins, and that penguins eat fish. Now, suppose that we visit the aviary at feeding time, and notice that most (but perhaps not all) of the birds in the aviary seem not to eat fish. From this information, we can infer that most of the birds in the aviary can fly. This conclusion draws on both the empirical (partial) information and reasoning from our explicit, factual knowledge: on the one hand, our empirical observations did not mention anything about whether or not the birds of the aviary could fly, and on the other hand, although our knowledge is sufficient to conclude that the birds that don't eat fish can fly, it isn't sufficient to conclude whether or not, broadly speaking, the birds in the aviary can fly.
Valiant's original work described an application of PAC-Semantics to the task of predicting the values of unknown attributes in new examples based on the values of some known attributes of the example-for example, filling in a missing word in an example sentence [41]. In this work, by contrast, we introduce and describe how to solve a (limited) decision task for PAC-Semantics, deciding whether or not a given "query" formula follows from the background knowledge, represented by both a collection of axiom formulas and a collection of examples. In particular, we use a model of partial information due to Michael [40] to capture and cope with reasoning from partially obscured examples from a target distribution.
What we show is roughly that as long as we can efficiently use small proofs to certify validity in the classical sense and the rules of inference in the proof system are preserved under restrictions, we can efficiently certify the validity (under PAC-Semantics) of a query from a sample of partial assignments whenever it follows from some formula(s) that could be verified to hold under the partial assignments. Thus, in such a case, the introduction of probability to the semantics in this limited way (to cope with the imperfection of learned rules) actually does not harm the tractability of inference. Moreover, the "learning" is actually also quite efficient, and imposes no restrictions on the representation class beyond the assumption that their values are observed under the partial assignments and the restrictions imposed by the proof system itself. In Section 4, we will then observe that almost every special case of a propositional proof system with an efficient decision algorithm considered in the literature satisfies these conditions, establishing the breadth of applicability of the approach.
It is perhaps more remarkable in from a learning theoretic perspective that our approach does not require the rules to be learned (or discovered) to be completely consistent with the examples drawn from the (arbitrary) distribution. In the usual learning context, this would be referred to as agnostic learning, as introduced by Kearns et al. [28]. Agnostic learning is notoriously hard-Kearns et al. noted that agnostic learning of conjunctions (over an arbitrary distribution, in the standard PAC-learning sense) would yield an efficient algorithm for PAC-learning DNF (also over arbitrary distributions), which remains the central open problem of computational learning theory. Again, by declining to produce a hypothesis, we manage to circumvent a barrier (to the state of the art, at least). Such rules of less-than-perfect validity seem to be very useful from the perspective of AI: for example, logical encodings of planning problems typically use "frame axioms" that assert that nothing changes unless it is the effect of an action. In a real world setting, these axioms are not strictly true, but such rules still provide a useful approximation. It is therefore desirable that we can learn to utilize them. We discuss this further in Section 5.
Relationship to other work Given that the task we consider is fundamental and has a variety of applications, other approaches have naturally been proposed-for example, Markov Logic [47] is one well-known approach based on graphical models, and Bayesian Logic Programming [29] is an approach that has grown out of the Inductive Logic Programming (ILP) community that can address the kinds of tasks we consider here. The main distinction between all of these approaches and our approach is that these other approaches all aim to model the distribution of the data, which is generally a much more demanding task -both in terms of the amount of data and computation time required -than simply answering a query. Naturally, the upshot of these other works is that they are much more versatile, and there are a variety of other tasks (e.g., density estimation, maximum likelihood computations) that these frameworks can handle that we do not. Our aim is instead to show how this more limited (but still useful) task can be done much more efficiently, much like how algorithms such as SVMs and boosting can succeed at predicting attributes without needing to model the distribution of the data.
In this respect, our work is similar to the Learning to Reason framework of Khardon and Roth [30], who showed how an NP-hard reasoning task (deciding a log n-CNF query), when coupled with a learning task beyond the reach of the state of the art (learning DNF from random examples) could result in an efficient overall system. The distinction between our work and Khardon and Roth's is, broadly speaking, that we re-introduce the theorem-proving aspect that Khardon and Roth had explicitly sought to avoid. Briefly, these techniques permit us to incorporate declaratively specified background knowledge and moreover, permit us to cope with partial information in more general cases than Khardon and Roth [31], who could only handle constant width clauses. Another difference between our work and that of Khardon and Roth, that also distinguishes our work from traditional ILP (e.g., [42]), is that as mentioned above, we are able to utilize rules that hold with less than perfect probability (akin to agnostic learning, but easier to achieve here).

Definitions and preliminaries
PAC-Semantics Inductive generalization (as opposed to deduction) inherently entails the possibility of making mistakes. Thus, the kind of rules produced by learning algorithms cannot hope to be valid in the traditional (Tarskian) sense (for reasons we describe momentarily), but intuitively they do capture some useful quality. PAC-Semantics were thus introduced by Valiant [51] to capture the quality possessed by the output of PAC-learning algorithms when formulated in a logic. Precisely, suppose that we observe examples independently drawn from a distribution over {0, 1} n ; now, suppose that our algorithm has found a rule f (x) for predicting some target attribute x t from the other attributes. The formula "x t = f (x)" may not be valid in the traditional sense, as PAC-learning does not guarantee that the rule holds for every possible binding, only that the rule f so produced agrees with x t with probability 1 − ǫ with respect to future examples drawn from the same distribution. That is, the formula is instead "valid" in the following sense: Definition 1 ((1 − ǫ)-valid) Given a distribution D over {0, 1} n , we say that a Boolean function R is (1 − ǫ)-valid if Pr x∈D [R(x) = 1] ≥ 1 − ǫ. If ǫ = 0, we say R is perfectly valid.
Of course, we may consider (1 − ǫ)-validity of relations R that are not obtained by learning algorithms and in particular, not of the form "x t = f (x)." Classical inference in PAC-Semantics. Valiant [51] considered one rule of inference, chaining, for formulas of the form ℓ t = f (x) where f is a linear threshold function: given a collection of literals such that the partial assignment obtained from satisfying those literals guarantees f evaluates to true, infer the literal ℓ t . Valiant observed that for such learned formulas, the conjunction of literals derived from a sequence of applications of chaining is also 1 − ǫ ′ -valid for some polynomially larger ǫ ′ . It turns out that this property of soundness under PAC-Semantics is not a special feature of chaining: generally, it follows from the union bound that any classically sound derivation is also sound under PAC-Semantics in a similar sense.
Proposition 2 (Classical reasoning is usable in PAC-Semantics) Let ψ 1 , . . . , ψ k be formulas such that each So, soundness under PAC-Semantics does not pose any constraints on the rules of inference that we might consider; the degree of validity of the conclusions merely aggregates any imperfections in the various individual premises involved. We also note that without further knowledge of D, the loss of validity from the use of a union bound is optimal.
Proposition 3 (Optimality of the union bound for classical reasoning) Let ψ 1 , . . . , ψ k be a collection of formulas such that there exists some distribution D on which each

Proof:
Since Proposition 2 guarantees that ψ 1 ∧ · · · ∧ ψ k is at least 1 − i ǫ i -valid where 1 − i ǫ i > 0, there must be a (satisfying) assignment x (0) for ψ 1 ∧ · · · ∧ ψ k . On the other hand, as each ψ i is not entailed by the others, there must be some assignment x (i) that satisfies the others but falsifies ψ i . We now construct D ′ : it places weight ǫ i on the assignment x (i) , and weight 1 − i ǫ i on x (0) . It is easy to verify that D ′ satisfies the claimed conditions. Subsequently, we will assume that our Boolean functions will be given by formulas of propositional logic formed over Boolean variables {x 1 , . . . , x n } by negation and the following linear threshold connectives (which we will refer to as the threshold basis for propositional formulas): Definition 4 (Threshold connective) A threshold connective for a list of k formulas φ 1 , . . . , φ k is given by a list of k + 1 real numbers, is interpreted as follows: given a Boolean interpretation for the k formulas, the connective is true if i: Naturally, a threshold connective expresses a k-ary AND connective by taking the c i = 1, and b = k, and expresses a k-ary OR by taking c 1 , . . . , c k , b = 1.
We note that Valiant actually defines PAC-Semantics for first-order logic by considering D to be a distribution over the values of atomic formulas. He focuses on formulas of bounded arity over a polynomial size domain; then evaluating such formulas from the (polynomial size) list of values of all atomic formulas is tractable, and in such a case everything we consider here about propositional logic essentially carries over in the usual way, by considering each atomic formula to be a propositional variable (and rewriting the quantifiers as disjunctions or conjunctions over all bindings). As we don't have any insights particular to first-order logic to offer, we will focus exclusively on the propositional case in this work.
Partial observability Our knowledge of a distribution D will be provided in the form of a collection of examples independently drawn from D, and our main question of interest will be deciding whether or not a formula is (1 − ǫ)-valid. Of course, reasoning in PAC-Semantics from (complete) examples is trivial: Hoeffding's inequality guarantees that with high probability, the proportion of times that the query formula evaluates to 'true' is a good estimate of the degree of validity of the formula. By contrast, if the distribution D is not known, then we can't guarantee that a formula is (1 − ǫ)-valid for any ǫ < 1 without examples without deciding whether the query is a tautology. So, it is only interesting to consider what happens "in between." To capture such "in between" situations, we will build on the theory of learning from partial observations developed by Michael [40].
Definition 5 (Partial assignments) A partial assignment ρ is an element of {0, 1, * } n . We say that a partial assignment ρ is consistent with an assignment Naturally, instead of examples from D, our knowledge of D will be provided in the form of a collection of example partial assignments drawn from a masking process over D: Definition 6 (Masking process) A mask is a function m : {0, 1} n → {0, 1, * } n , with the property that for any x ∈ {0, 1} n , m(x) is consistent with x. A masking process M is a mask-valued random variable (i.e., a random function). We denote the distribution over partial assignments obtained by applying a masking process M to a distribution D over assignments by M (D).
Note that the definition of masking processes allows the hiding of entries to depend on the underlying example from D. Of course, since we know that when all entries are hidden by a masking process the problem we consider will become NP-hard, we must restrict our attention to settings where it is possible to learn something about D. In pursuit of this, we will consider formulas that can be evaluated in the straightforward way from the partial assignments with high probability-such formulas are one kind which we can certainly say that we know to be (essentially) true under D.
Definition 7 (Witnessed formulas) We define a formula to be witnessed to evaluate to true or false in a partial assignment by induction on its construction; we say that the formula is witnessed iff it is witnessed to evaluate to either true or false.
• A variable is witnessed to be true or false iff it is respectively true or false in the partial assignment. • ¬φ is witnessed to evaluate to true iff φ is witnessed to evaluate to false; naturally, ¬φ is witnessed to evaluate to false iff φ is witnessed to evaluate to true.
(i.e., iff the truth or falsehood, respectively, of the inequality is determined by the witnessed formulas, regardless of what values are substituted for the non-witnessed formulas.) An example of particular interest is a CNF formula. A CNF is witnessed to evaluate to true in a partial assignment precisely when every clause has some literal that is satisfied. It is witnessed to evaluate to false precisely when there is some clause in which every literal is falsified.
Refining the motivating initial discussion somewhat, a witnessed formula is one that can be evaluated in a very local manner. When the formula is not witnessed, we will likewise be interested in the following "simplification" of the formula obtained from an incomplete evaluation: Definition 8 (Restricted formula) Given a partial assignment ρ and a formula φ, the restriction of φ under ρ, denoted φ| ρ , is recursively defined as follows: • If φ is witnessed in ρ, then φ| ρ is the formula representing the value that φ is witnessed to evaluate to under ρ. • If φ is a variable not set by ρ, φ| ρ = φ.
Proof systems. We will need a formalization of a "proof system" in order to state our theorems: Definition 9 (Proof system) A proof system is given by a sequence of relations {R i } ∞ i=0 over formulas such that R i is of arity-(i + 1) and whenever R i (ψ j 1 , . . . , ψ j i , ϕ) holds, {ψ j 1 , . . . , ψ j i } |= ϕ. Any formula ϕ satisfying R 0 is said to be an axiom of the proof system. A proof of a formula φ from a set of hypotheses H in the proof system is given by a finite sequence of triples consisting of 1. A formula ψ k 2. A relation R i of the proof system or the set H 3. A subsequence of formulas ψ j 1 , . . . , ψ j i with j ℓ < k for ℓ = 1, . . . , i (i.e., from the first components of earlier triples in the sequence) such that R i (ψ j 1 , . . . , ψ j i , ψ k ) holds, unless ψ k ∈ H. for which φ is the first component of the final triple in the sequence.
Needless to say it is generally expected that R i is somehow efficiently computable, so that the proofs can be checked. We don't explicitly impose such a constraint on the formal object for the sake of simplicity, but the reader should be aware that these expectations will be fulfilled in all cases of interest.
We will be interested in the effect of the restriction (partial evaluation) mapping applied to proofs-that is, the "projection" of a proof in the original logic down to a proof over the smaller set of variables by the application of the restriction to every step in the proof. Although it may be shown that this at least preserves the (classical) semantic soundness of the steps, this falls short of what we require: we need to know that the rules of inference are preserved under restrictions. Since the relations defining the proof system are arbitrary, though, this property must be explicitly verified. Formally, then: Definition 10 (Restriction-closed proof system) We will say that a proof system over propositional formulas is restriction closed if for every proof of the proof system and every partial assignment ρ, for any (satisfactory) step of the proof R k (ψ 1 , . . . , ψ k , φ), there is some j ≤ k such that for the subsequence ψ i 1 , . . . , ψ i j R j (ψ i 1 | ρ , . . . , ψ i j | ρ , φ| ρ ) is satisfied, and the formula 1 ("true") is an axiom. 1 So, when a proof system is restriction-closed, given a derivation of a formula ϕ from ψ 1 , . . . , ψ k , we can extract a derivation of ϕ| ρ from ψ 1 | ρ , . . . , ψ k | ρ for any partial assignment ρ such that the steps of the proof consist of formulas mentioning only the variables masked in ρ. (In particular, we could think of this as a proof in a proof system for a logic with variables {x i : ρ i = * }.) In a sense, this means that we can extract a proof of a "special case" from a more general proof by applying the restriction operator to every formula in the proof. Again, looking ahead to Section 4, we will see that the typical examples of propositional proof systems that have been considered essentially have this property.
We will be especially interested in limited versions of the decision problem for a logic given by a collection of "simple" proofs-if the proofs are sufficiently restricted, it is possible to give efficient algorithms to search for such proofs, and then such a limited version of the decision problem will be tractable, in contrast to the general case. Formally, now: Definition 11 (Limited decision problem) Fix a proof system, and let S be a set of proofs in the proof system. The limited decision problem for S is then the following promise problem: given as input a formula ϕ with no free variables and a set of hypotheses H such that either there is a proof of ϕ in S from H or else H |= ϕ, decide which case holds.
A classic example of such a limited decision problem for which efficient algorithms exist is for formulas of propositional logic that have "treelike" resolution derivations of constant width (cf. the work of Ben-Sasson and Wigderson [7] or the work of Beame and Pitassi [6], building on work by Clegg et al. [11]). We will actually return to this example in more detail in Section 4, but we mention it now for the sake of concreteness.
We will thus be interested in syntactic restrictions of restriction-closed proof systems. We wish to know that (in contrast to the rules of the proof system) these syntactic restrictions are likewise closed under restrictions in the following sense: Definition 12 (Restriction-closed set of proofs) A set of proofs S is said to be restriction closed if whenever there is a proof of a formula ϕ from a set of hypotheses H in S, there is also a proof of ϕ| ρ in from the set H| ρ in S for any partial assignment ρ.

Inferences from incomplete data with implicit learning
A well-known general phenomenon in learning theory is that a restrictive choice of representation for hypotheses often imposes artificial computational difficulties. Since fitting a hypothesis is often a source of intractability, it is natural to suspect that one would often be able to achieve more if the need for such an explicit hypothesis were circumvented-that is, if "learning" were integrated more tightly into the application using the knowledge extracted from data. For the application of answering queries, this insight was pursued by Khardon and Roth [30] in the learning to reason framework, where queries against an unknown DNF could be answered using examples. The trivial algorithm that evaluates formulas on complete assignments and uses the fraction satisfied to estimate the validity suggests how this might happen: the examples themselves encode the needed information and so it is easier to answer the queries using the examples directly. In this case, the knowledge is used implicitly: the existence of the DNF describing the support of the distribution (thus, governing which models need to be considered) guarantees that the behavior of the algorithm is correct, but at no point does the algorithm "discover" the representation of such a DNF. Effectively, we will Algorithm 1: DecidePAC parameter: Algorithm A solving the limited decision problem for the class of proofs S. input : Formula ϕ, ǫ, δ, γ ∈ (0, 1), list of partial assignments ρ (1) , . . . , ρ (m) from M (D), list of hypothesis formulas H output : Accept if there is a proof of ϕ in S from H and formulas ψ 1 , ψ 2 , . . . that are simultaneously witnessed true with probability at least return Accept develop an alternative approach that incorporates reasoning to cope with incomplete examples and explicit background knowledge, and yet retains the appealing circumvention of the construction of explicit representations for learned knowledge. In this approach, there are "axioms" that can be extracted from the observable data, which we suppose that if known, could be combined with the background knowledge to answer a given query. More formally, these "axioms" are formulas for which it is feasible to verify consistency with the underlying distribution (from the masked examples), that nevertheless suffice to complete a proof. This is necessary in some sense (cf. Proposition 32), and at least seems to be not much more restrictive than the requirements imposed by concept learning. Specifically, we will utilize formulas that are witnessed to evaluate to true on the distribution over partial assignments with probability at least (1 − ǫ). We will consider any such formulas to be "fair game" for our algorithm, much as any member of a given concept class is "fair game" for concept learning.
We now state and prove the main theorem, showing that a variant of the limited decision problem in which the proof may invoke these learnable formulas as "axioms" is essentially no harder than the original limited decision problem, as long as the proof system is restriction-closed. The reduction is very simple and is given in Algorithm 1.
Theorem 13 (Adding implicit learning preserves tractability) Let S be a restriction-closed set of proofs for a restriction-closed proof system. Suppose that there is an algorithm for the limited decision problem for S running in time T (n, |ϕ|, |H|) on input ϕ and H over n variables. Let D be a distribution over assignments, M be any masking process, and H be any set of formulas. Then there is an algorithm that, on input ϕ, H, δ and ǫ, uses O(1/γ 2 log 1/δ) examples, runs in time O(T (n, |ϕ|, |H|) 1 γ 2 log 1 δ ), and such that given that either . . , ψ k are all witnessed to evaluate to true with probability (1 − ǫ + γ) over M (D) decides which case holds.
Proof: Suppose we run Algorithm 1 on m = 1 2γ 2 ln 1 δ examples drawn from D. Then, (noting that we need at most log m bits of precision for B) the claimed running time bound and sample complexity is immediate. As for correctness, first note that by the soundness of the proof system, whenever there is a proof of ϕ| ρ (i) from H| ρ (i) , ϕ| ρ (i) must evaluate to true in any interpretation of the remaining variables consistent with H| ρ (i) . Thus, if H ⇒ ϕ is not (1 − ǫ − γ)-valid with respect to D, an interpretation sampled from D must satisfy H and falsify ϕ with probability at least ǫ + γ; for any partial assignment ρ derived from this interpretation (i.e., sampled from M (D)), the original interpretation is still consistent, and therefore H| ρ |= ϕ| ρ for this ρ. So in summary, we see that a ρ sampled from M (D) produces a formula ϕ| ρ such that H| ρ |= ϕ| ρ with probability at least ǫ + γ, and so the limited decision algorithm A rejects with probability at least ǫ + γ. It follows from Hoeffding's inequality now that for m as specified above, at least ǫm of the runs of A reject (and hence the algorithm rejects) with probability at least 1 − δ.
So, suppose instead that there is a proof in S of ϕ from H and some formulas ψ 1 , . . . , ψ k that are all witnessed to evaluate to true with probability at least (1 − ǫ + γ) over M (D). Then, with probability (1 − ǫ + γ), ψ 1 | ρ , . . . , ψ k | ρ = 1. Then, since S is a restriction closed set, if we replace each assertion of some ψ j with an invocation of R 0 for the axiom 1, then by applying the restriction ρ to every formula in the proof, one can obtain a proof of ϕ| ρ from H| ρ alone. Therefore, as A solves the limited decision problem for S, we see that for each ρ drawn from M (D), A(ϕ| ρ , H| ρ ) must accept with probability at least (1 − ǫ + γ), and Hoeffding's inequality again gives that the probability that more than ǫm of the runs reject is at most δ for this choice of m.
The necessity of computationally feasible witnessing. The reader may, at this point, feel that our notion of witnessed values is somewhat ad-hoc, and suspect that perhaps a weaker notion should be considered (corresponding to a broader class of masking processes). Although it may be the case that a better notion exists, we observe in Appendix A that it is crucial that we use some kind of evaluation algorithm on partial assignments that is computationally feasible. Witnessed evaluation is thus, at least, one such notion, whereas other natural notions are likely computationally infeasible, and thus inappropriate for such purposes.

Proof systems with tractable, restriction-closed special cases
We now show that most of the usual propositional proof systems considered in the literature possess natural restriction-closed special cases, for which the limited decision problem may be efficiently solved. Thus, in each case, we can invoke Theorem 13 to show that we can efficiently integrate implicit learning into the reasoning algorithm for the proof system.

Special cases of resolution
Our first example of a proof system for use in reasoning in PAC-Semantics is resolution, a standard object of study in proof theory. Largely due to its simplicity, resolution turned out to be an excellent system for the design of surprisingly effective proof search algorithms such as DPLL [14,13]. Resolution thus remains attractive as a proof system possessing natural special cases for which we can design relatively efficient algorithms for proof search. We will recall two such examples here. The resolution proof system. Resolution is a proof system that operates on clauses-disjunctions of literals. The main inference rule in resolution is the cut rule: given two clauses containing a complementary pair of literals (i.e., one contains the negation of a variable appearing without negation in the other) A ∨ x and B ∨ ¬x, we infer the resolvent A ∨ B. We will also find it convenient to use the weakening rule: from any clause C, for any set of literals ℓ 1 , . . . , ℓ k , we can infer the clause C ∨ ℓ 1 ∨ · · · ∨ ℓ k . As stated, resolution derives new clauses from a set of known clauses (a CNF formula). Typically, one actually refers to resolution as a proof system for DNF formulas by using a resolution proof as a proof by contradiction: one shows how the unsatisfiable empty clause ⊥ can be derived from the negation of the input DNF. This is referred to as a resolution refutation of the target DNF, and can also incorporate explicit hypotheses given as CNF formulas.
Treelike resolution proofs. The main syntactic restriction we consider on resolution refutations intuitively corresponds to a restriction that a clause has to be derived anew each time we wish to use it in a proof-a restriction that the proof may not (re-)use "lemmas." It will not be hard to see that while this does not impact the completeness of the system since derivations may be repeated, this workaround comes at the cost of increasing the size of the proof. A syntactic way of capturing these proofs proceeds by recalling that the proof is given by a sequence of clauses that are either derived from earlier clauses in the sequence, or appear in the input CNF formula (to be refuted). Consider the following directed acyclic graph (DAG) corresponding to any (resolution) proof: the set of nodes of the graph is given by the set of clauses appearing in the lines of the proof, and each such node has incoming edges from the nodes corresponding to the clauses earlier in the proof used in its derivation; the clauses that appeared in the input CNF formula are therefore the sources of this DAG, and the clause proved by the derivation corresponds to a sink of the DAG (i.e., in a resolution refutation, the empty clause appears at a sink of the DAG). We say that the proof is treelike when this DAG is a (rooted) tree-i.e., each node has at most one outgoing edge (equivalently, when there is a unique path from any node to the unique sink). Notice, the edges correspond to the use of a clause in a step of the proof, so this syntactic restriction corresponds to our intuitive notion described earlier.
We are interested in resolution as a proof system with special cases that not only possess efficient decision algorithms, but are furthermore restriction-closed. We will first establish that (treelike) resolution in general is restriction-closed, and subsequently consider the effects of our additional restrictions on the proofs considered. For syntactic reasons (to satisfy Definition 10), actually, we need to include a tautological formula 1 as an axiom of resolution. We can take this to correspond to the clause containing all literals, which is always derivable by weakening from any nonempty set of clauses (and is furthermore essentially useless in any resolution proof, as it can only be used to derive itself).

Proposition 14 (Treelike resolution is restriction-closed)
Resolution is a restriction-closed proof system. Moreover, the set of treelike resolution proofs of length L is restriction-closed.
Proof: Assuming the inclusion of the tautological axiom 1 as discussed above, the restrictionclosedness is straightforward: Fix an partial assignment ρ, and consider any step of the proof, deriving a clause C. If C appeared in the input formula, then C| ρ appears in the restriction of the input formula. Otherwise, C is derived by one of our two rules, cut or weakening. For the cut rule, suppose C is derived from A ∨ x i and B ∨ ¬x i . If ρ i ∈ {0, 1} then C can either be derived from (A ∨ x i )| ρ or (B ∨ ¬x i )| ρ by weakening. If ρ i = * and C| ρ = 1, then both (A ∨ x i )| ρ and (B ∨ ¬x i )| ρ are not 1, and the same literals are eliminated (set to 0) in these clauses as in C| ρ , so C| ρ follows from the cut rule applied to x i on these clauses. If C| ρ = 1 followed from weakening of some other clause C ′ , we know C ′ | ρ = 1 as well, since any satisfied literals in C ′ appear in C; therefore C| ρ follows from weakening applied to C ′ | ρ . Finally, if C| ρ = 1, then we already know that 1 can be asserted as an axiom. So, resolution is restriction-closed.
Recalling the DAG corresponding to a resolution proof has nodes corresponding to clauses and edges indicating which clauses are used in the derivation of which nodes, note that the DAG corresponding to the restriction of a resolution proof as constructed in the previous paragraph has no additional edges. Therefore, the sink in the original DAG remains a sink. Although the DAG may now be disconnected, if consider the connected component containing the node corresponding to the original sink, we see that this is indeed a tree; furthermore, since every clause involved in the derivation of a clause corresponding to a node of the tree corresponds to another node of the tree and the overall DAG corresponded to a syntactically correct resolution proof from the restriction of the input formula, by the restriction-closedness of resolution, this tree corresponds to a treelike resolution proof of the restriction of the clause labeling the sink from the restriction of the input formula. As this is a subgraph of the original graph, it corresponds to a proof that is also no longer than the original, as needed.
Bounded-space treelike resolution. Our first special case assumes not only that the resolution proof is treelike, but also that it can be carried out using limited space, in the sense first explored by Esteban and Torán [18]. That is, we associate with each step of the proof a set of clauses that we refer to as the blackboard. Each time a clause is derived during a step of the proof, we consider it to be added to the blackboard; we also allow any clauses in the blackboard to be erased across subsequent steps of the proof. Now, the central restriction is that instead of simply requiring the steps of the proof to utilize clauses that appeared earlier in the proof, we demand that they only utilize clauses that appeared in the blackboard set on the previous step. We now say that the proof uses (clause) space s if the blackboard never contains more than s clauses. We note that the restriction that the proof is treelike means that each time we utilize clauses in a derivation, we are free to delete them from the blackboard. In fact, given the notion of a blackboard, it is easily verified that this is an equivalent definition of a treelike proof. Even with the added restriction to clause space s, treelike resolution remains restriction-closed:

Proposition 15
The set of clause space-s treelike resolution proofs is restriction closed.

Proof:
Let a space-s treelike resolution proof Π and any partial assignment ρ be given; we recall the corresponding treelike proof Π ′ constructed in the proof of Proposition 14; we suppose that Π derives the sequence of clauses establishing that Π can be carried out in clause space s, we construct a sequence of blackboards and take the subsequence corresponding to steps in Π ′ , . It is immediate that every B ′ i j contains at most s clauses, so we only need to establish that these are a legal sequence of blackboards for Π ′ . We first note that whenever a clause is added to a blackboard B ′ i j over B ′ i j−1 , then since (by construction) it was not added in i ′ ∈ [i j−1 , i j ] it must be that it is added (to B i j ) in step i j , which we know originally derived C i j in Π, and hence in Algorithm 2: SearchSpace input : CNF ϕ, integer space bound s ≥ 1, current clause C output: A space-s treelike resolution proof of C from clauses in ϕ, or "none" if no such proof exists. begin if C is a superset of some clause C ′ of ϕ then return The weakening derivation of C from C ′ .
does not return none then return Derivation of C from Π 1 and Π 2 else return none return none Π ′ derives C i j | ρ by construction of Π ′ (so this is the corresponding jth step of Π ′ ). Likewise, if a clause is needed for the derivation of any jth step of Π ′ , by the construction of Π ′ from Π, it must be that C i j | ρ = 1 and whenever some step i j of Π uses an unsatisfied clause from some earlier step t of Π, then Π ′ includes the step corresponding to t. Therefore there exists k such that t = i k ; and, is a legal sequence of blackboards for Π ′ . The algorithm for finding space-s resolution proofs, SearchSpace, appears as Algorithm 2. Although the analysis of this algorithm appears elsewhere, we include the proof (and its history) in Appendix B for completeness.
Theorem 16 (SearchSpace finds space-s treelike proofs when they exist) If there is a spaces treelike proof of a clause C from a CNF formula ϕ, then SearchSpace returns such a proof, and otherwise it returns "none." In either case, it runs in time O(|ϕ| · n 2(s−1) ) where n is the number of variables.
Naturally, we can convert SearchSpace into a decision algorithm by accepting precisely when it returns a proof. Therefore, as space-s treelike resolution proofs are restriction-closed by Proposition 15, Theorem 13 can be applied to obtain an algorithm that efficiently learns implicitly from example partial assignments to solve the corresponding limited decision problem for (1 − ǫ)-validity with space-s treelike resolution proofs. Explicitly, we obtain: Corollary 17 (Implicit learning in space-bounded treelike resolution) Let a KB CNF φ and clause C be given, and suppose that partial assignments are drawn from a masking process for an underlying distribution D; suppose further that either 1. There exists some CNF ψ such that partial assignments from the masking process are witnessed to satisfy ψ with probability at least (1 − ǫ + γ) and there is a space-s treelike proof of C from φ ∧ ψ or else 2.
A quasipolynomial time algorithm for treelike resolution. As we noted previously, Beame and Pitassi [6] gave an algorithm essentially similar to SearchSpace, but only established that it could find treelike proofs in quasipolynomial time. Their result follows from Theorem 16 and the following generic space bound: Proposition 18 A treelike proof Π can be carried out in clause space at most log 2 |Π| + 1.
So therefore, if there is a treelike proof of a clause C from a formula ϕ of size n k , SearchSpace (run with the bound s = k log n + 1) finds the proof in time O(|ϕ| · n 2k log n ). We also include the proof in Appendix B.
Bounded-width resolution. Our second special case of resolution considers proofs using small clauses. Precisely, we refer to the number of literals appearing in a clause as the width of the clause, and we naturally consider the width of a resolution proof to be the maximum width of any clause derived in the proof (i.e., excluding the input clauses). Bounded-width resolution was originally formally investigated by Galil [20], who exhibited an efficient dynamic programming algorithm for bounded-width resolution. Galil's algorithm easily generalizes to k-DNF resolution, i.e., the proof system RES(k), (with standard resolution being recovered by k = 1) so we will present the more general case here.
Briefly, RES(k), introduced by Krajíček [32], is a proof system that generalizes resolution by operating on k-DNF formulas instead of clauses (which are, of course, 1-DNF formulas) and introduces some new inference rules, described below. In more detail, recall that a k-DNF is a disjunction of conjunctions of literals, where each conjunction contains at most k literals. Each step of a RES(k) proof derives a k-DNF from one of the following rules. Weakening is essentially similar to the analogous rule in resolution: from a k-DNF ϕ, we can infer the k-DNF ϕ ∨ ψ for any k-DNF ψ. RES(k) also features an essentially similar cut rule: from a k-DNF A ∨ (ℓ 1 ∧ · · · ∧ ℓ j ) (j ≤ k) and another k-DNF B ∨¬ℓ 1 ∨· · ·∨¬ℓ j , we can infer the k-DNF A∨B. The new rules involve manipulating the conjunctions: given j ≤ k formulas ℓ 1 ∨A, . . . , ℓ j ∨A, we can infer (ℓ 1 ∧· · ·∧ℓ j )∨A by ∧-introduction. Likewise, given (ℓ 1 ∧ · · · ∧ ℓ j ) ∨ A, we can infer ℓ i ∨ A for any i = 1, . . . , j by ∧-elimination.
We wish to show that RES(k) is restriction-closed; actually, for technical simplicity, we will represent 1 by the disjunction of all literals. This can be derived from any DNF by a linear number of ∧-elimination steps (in the size of the original DNF) followed by a weakening step, so it is not increasing the power of RES(k) appreciably to include such a rule.

Proposition 19
For any k, RES(k) is restriction-closed.

Proof:
We are given (by assumption) that our encoding of 1 is an axiom. Let any partial assignment ρ be given, and consider the DNF ϕ derived on any step of the proof. Naturally, if ϕ was a hypothesis, then ϕ| ρ is also a hypothesis. Otherwise, it was derived by one of the four inference rules. We suppose that ϕ| ρ = 1 (or else we are done). Thus, if ϕ was derived by weakening from ψ, it must be the case that ψ| ρ = 1, since otherwise ϕ| ρ = 1, so ϕ| ρ follows from ψ| ρ again by weakening since every conjunction in ψ| ρ appears in ϕ| ρ . Likewise, if ϕ = ℓ i ∨ A was derived by ∧-elimination from ψ = (ℓ 1 ∧ · · · ∧ ℓ j ) ∨ A, then since ℓ i | ρ = 1 and A| ρ must not be 1, neither the conjunction ℓ i was taken from in ψ nor the rest of the formula A evaluates to 1 and thus ψ| ρ = 1. Then, if some ℓ t is set to 0 by ρ, ψ| ρ = A| ρ , and ϕ| ρ follows from ψ| ρ by weakening; otherwise, ϕ| ρ still follows by ∧-elimination.
We now turn to consider ϕ = (ℓ 1 ∧ · · · ∧ ℓ j ) ∨ A that were derived by ∧-introduction. We first consider the case where some literal ℓ i in the new conjunction is set to 0 in ρ (and so ϕ| ρ = A| ρ ). In this case, one of the premises in the ∧-introduction step was ℓ i ∨ A, where (ℓ i ∨ A)| ρ = A| ρ = ϕ| ρ , so in fact ϕ| ρ can be derived just as ℓ i ∨ A was derived. We now suppose that no ℓ i is set to 0 in ρ; let ℓ i 1 , . . . , ℓ is denote the subset of those literals that are not set to 1 (i.e., satisfy ℓ it | ρ = ℓ it ). Then ϕ| ρ = (ℓ i 1 ∧ · · · ∧ ℓ is ) ∨ A| ρ , where since A| ρ = 1, the premises ℓ it ∨ A used to derive ϕ all satisfy (ℓ it ∨ A)| ρ = ℓ it ∨ A| ρ = 1, and so we can again derive ϕ| ρ by ∧-introduction from this subset of the original premises.
Finally, we suppose that ϕ = A ∨ B we derived by the cut rule applied to A ∨ (ℓ 1 ∧ · · · ∧ ℓ j ) and B ∨ ¬ℓ 1 ∨ · · · ∨ ¬ℓ j . If some ℓ i is set to 0 by ρ, then the first premise satisifies (A ∨ (ℓ 1 ∧ · · · ∧ ℓ j ))| ρ = A| ρ and so ϕ| ρ = A| ρ ∨ B| ρ can be derived by weakening from the first premise. If not, we let ℓ i 1 , . . . , ℓ is denote the subset of those literals that are not set to 1. Then the first premise becomes A| ρ ∨ (ℓ i 1 ∧ · · · ∧ ℓ is ) = 1 (since we assumed ϕ| ρ = 1) and likewise, the second premise becomes B| ρ ∨ ¬ℓ i 1 ∨ · · · ∨ ¬ℓ is = 1 (as likewise B| ρ = 1 and no ℓ it | ρ = 0), so ϕ| ρ follows by the cut rule applied to these two premises. Now, RES(k) possesses a "bounded-width" restriction for which we will observe has a limited decision problem that can be solved by a dynamic programming algorithm (given in pseudocode as Algorithm 3). More precisely, we will say that a DNF has width w if it is a disjunction of at most w conjunctions, and so likewise the width of a RES(k) proof is the maximum width of any k-DNF derived in the proof.
Theorem 20 (Efficient decision of bounded-width RES(k)) Algorithm 3 accepts iff there is a RES(k) proof of its input φ from the input k-DNF formulas ϕ 1 . . . , ϕ ℓ of width at most w. If there are n variables, it runs in time O(n kw+1 (n kw + ℓ) k max{kn kw , |ϕ i |}).

Proof:
The correctness is straightforward: if there is a width-w RES(k) proof, then a new derivation step from the proof is performed on each iteration of the main loop until φ is derived, and conversely, every time T [ψ] is set to 1, a width-w derivation of ψ could be extracted from the run of the algorithm. So, it only remains to consider the running time.
The main observation is that there are at most O(n kw ) width-w k-DNFs. (The initialization thus takes time at most O(n kw ℓ).) At least one of these must be derived on each iteration. Each iteration considers all possible derivations using up to k distinct formulas either in the table or given in the input, of which there are O((n kw + ℓ) k ) tuples. We thus need to consider only the time to check each of the possible derivations.
A formula ψ 1 must be a width-w k-DNF for another width-w k-DNF ψ ′ to be derivable via weakening, and then for each other width-w k-DNF ψ ′ , we can check whether or not it is a weakening of ψ 1 in time O(n kw ) by just checking whether all of the conjunctions of ψ 1 appear in ψ ′ . Likewise, for ∧-introduction, the formula must already be a width-w k-DNF, and we can check whether or not the j ≤ k formulas have a shared common part by first checking which conjunctions from the first formula appear in the second, and then, if only one literal is left over in each, checking that the other j − 2 formulas have the same common parts with one literal left over. We then obtain the resulting derivation by collecting these j literals, in an overall time of O(kn kw ).
For the ∧-elimination rule, the formula must already be width-w for us to obtain a width-w result. Then, we can easily generate each of the possible results in time linear in the length of the formula, that is, O(n kw ). For the cut rule, we only need to examine each conjunction of each formula, and check if the literals appear negated among the conjunctions of the other formula, taking time linear in the size of the formulas, which is O(max{n kw , |ϕ i |}); checking that the result is a width-w k-DNF then likewise can be done in linear time in the size of the formulas.
Finally, we note that the width-w syntactic restriction of RES(k) refutations is restriction-closed:

Proposition 21
The set of width-w RES(k) refutations is restriction-closed.
Proof: Let any width-w RES(k) refutation Π and partial assignment ρ be given. In the construction used in Proposition 19, we obtained a proof Π ′ of ⊥| ρ = ⊥ from Π with the property that every formula ψ ′ appearing in Π ′ satisfies ψ ′ = ψ| ρ for some ψ appearing in Π. Furthermore, we guaranteed that no derivation step used a formula that simplified to 1. It therefore suffices to note that for any width-w k-DNF ψ, ψ| ρ is also a k-DNF with width at most w. By Theorem 13, DecidePAC can be applied to Algorithm 3 to obtain a second implicit learning algorithm, for a width-w RES(k).
Corollary 22 (Implicit learning in bounded-width RES(k)) Let a KB of k-DNFs φ 1 . . . , φ ℓ and target disjunction of k-CNFs ϕ be given, and suppose that partial assignments are drawn from a masking process for an underlying distribution D; suppose further that either 1. There exists some conjunction of k-DNFs ψ such that partial assignments from the masking process are witnessed to satisfy ψ with probability at least (1 − ǫ + γ) and there is a width-w Then, there an algorithm running in time O(n kw+1 (n kw + ℓ) k max{kN kw , |φ i |} 1 γ 2 log 1 δ ) that distinguishes these cases with probability 1 − δ when given ϕ, φ 1 . . . , φ ℓ , ǫ, γ, and a sample of O( 1 γ 2 log 1 δ ) partial assignments.

Degree-bounded polynomial calculus
Our next example proof system is Polynomial calculus, an algebraic proof system originally introduced by Clegg et al. [11] as a (first) example of a proof system that could simulate resolution (the gold standard for theorem-proving heuristics) on the one hand, and possessing a natural special case for which the limited decision problem could demonstrably be solved in polynomial time using a now standard computer algebra algorithm, the Gröbner basis algorithm due to Buchberger [8].
Although the original hopes of Clegg et al. -that polynomial calculus might one day supplant resolution as the proof system of choice -have not been fulfilled due to the fact that heuristics based on resolution have been observed to perform spectacularly well in practice, it nevertheless represents a potentially more powerful system that furthermore alludes to the diversity possible among proof systems.
The polynomial calculus proof system. In polynomial calculus, formulas have the form of polynomial equations over an arbitrary nontrivial field F (for the present purposes, assume F is Q, the field of rationals), and we are interested in their Boolean solutions. A set of hypotheses is thus a system of equations, and polynomial calculus enables us to derive new constraints that are satisfied by any Boolean solutions to the original system. Of course, in this correspondence, our Boolean variables serve as the variables of the polynomials.
More formally, for our Boolean variables x 1 , . . . , x n , our formulas are equations of the form [p = 0] for p ∈ F[x 1 , . . . , x n ] (i.e., formal multivariate polynomials over the field F with indeterminates given by the variables). We require that the polynomials are represented as a sum of monomials: that is, every line is of the form s∈N n c s i∈supp(s) for coefficients c s ∈ F, where the products i∈supp(s) x s i i are the monomials corresponding to the degree vector s. For each variable, the proof system has a Boolean axiom [x 2 −x = 0] (asserting that x ∈ {0, 1}). The rules of inference are linear combination, which asserts that for equations [p = 0] and [q = 0], for any coefficients a and b from F, we can infer [a · p + b · q = 0]; and multiplication, which asserts that for any variable (indeterminate) x and polynomial equation [p = 0], we can derive [x · p = 0]. A refutation in polynomial calculus is a derivation of the polynomial 1, i.e., the contradictory equation [1 = 0]. We will encode "true" as the equation [0 = 0], and we will modify the system to allow this equation to be asserted as an axiom; of course, it can be derived in a single step from any polynomial calculus formula [p = 0] by the linear combination p + (−1)p, so we are essentially not changing the power of the proof system at all.
We also note that without loss of generality, we can restrict our attention to formulas in which no indeterminate appears in a monomial with degree greater than one-such monomials are referred to as multilinear. Intuitively this is so because the Boolean axioms assert that a larger power can be replaced by a smaller one; formally, one could derive this as follows: Suppose we have a formula with a monomial expression x k · m. Then by multiplying the Boolean axiom by x k − 2 times, and then by the indeterminates in m, one obtains [x k · m − x k−1 · m = 0]. A linear combination with the original formula then yields an expression with the original monomial replaced by x k−1 · m, so by repeating this trick k − 2 additional times, we eventually reduce the monomial to x · m. The same trick can be applied to the rest of the indeterminates appearing in m, and then to the rest of the monomials in the formula. We will refer to this as the multilinearization of the formula. (The original formula could be re-derived by a similar series of steps, so nothing is lost in this translation.) Looking ahead, we will be focusing on the degree-bounded restriction of polynomial calculus, and so we will assume for simplicity that all formulas are expressed in this multilinearized (minimal-degree) form. Of course, because the translation can be performed in a number of steps that is quadratic in the total degree and linear in the size of the formula, this does not alter the power of the proof system by much at all.
A note on witnessing and restrictions. The polynomial equations can be fit into our framework of restrictions and witnessing somewhat naturally, thanks to our restriction to the sum of monomials representation: since we have restricted our attention to cases where each variable (hence, indeterminate in the polynomial) takes only Boolean values, we observe that a monomial corresponds (precisely) to a conjunction over the set of variables in the support of its degree vector. Then, if say F is Q, we can then express the polynomial equation where we thus denote the polynomial arising from applying ρ to [p = 0] by p| ρ . This has the effect that the polynomial equation is witnessed true if all of the monomials (with nonzero coefficients) are witnessed, and the equation evaluates to 0, and witnessed false if enough of the monomials are witnessed so that regardless of the settings of the rest of the variables, the sum is either too large or too small to be zero. Once again, this is a weak kind of "witnessed evaluation" that is nevertheless feasible, and saves us from trying to solve a system of multivariate polynomial equations-which is easily seen to be NP-hard (NP-complete if we know we are only interested in Boolean solutions).
Polynomial calculus with resolution. Although polynomial calculus can encode the literal ¬x as the polynomial (1 − x), the effect of this choice on the encoding of a clause is undesirable: for example, recalling the correspondence between monomials and conjunctions, the clause x 1 ∨ · · · ∨ x n corresponds to the polynomial (1 − x 1 ) · · · (1 − x n ) which has an exponential-size (in n) monomial representation, and hence requires an exponential-size polynomial calculus formula. In the interest of efficiently simulating resolution in polynomial calculus, Alekhnovich et al. [1] introduced the following extension of polynomial calculus known as polynomial calculus with resolution (PCR): the formulas are extended by introducing for each variable x, a new indeterminatex, related by the complementarity axiom [x +x − 1 = 0] (forcingx = ¬x). We can thus represent any clause ℓ 1 ∨ · · · ∨ ℓ k as a polynomial calculus formula using a single monomial [(¬ℓ 1 ) · · · (¬ℓ k ) = 0] by choosing the appropriate indeterminate for each ¬ℓ i . The reader may verify that in such a case, the cut rule is captured by adding the monomials (with coefficients of 1) and weakening may be simulated by (repeated) multiplication.

Proposition 23
Polynomial calculus and polynomial calculus with resolution are restriction-closed.

Proof:
Let any partial assignment ρ be given. If a proof step asserts a hypothesis [p = 0], then its restriction [p| ρ = 0] can also be asserted from the restriction of the hypothesis set. The Boolean axiom [x 2 − x = 0] can easily be seen to simplify to [0 = 0] if ρ assigns a value to x, and otherwise [x 2 − x = 0]| ρ = [x 2 − x = 0], so in the latter case we can simply assert the Boolean axiom for x. For polynomial calculus with resolution, we need to further consider the complementarity axioms, but as α is witnessed precisely whenx is witnessed, we again have that if ρ(x) = * , then the complementarity axiom simplifies to [0 = 0], and otherwise [x +x − 1 = 0]| ρ = [x +x − 1 = 0], so we can simply assert the corresponding complementarity axiom.

Degree-bounded polynomial calculus
Given that the monomial representation of polynomials (in contrast to the clauses we considered in resolution) may be of exponential size in n (the number of variables), it is natural to wish to consider a restricted class of formulas in which the representations of formulas are guaranteed to be of polynomial size. One way to achieve this is to consider only degree-d polynomials for some fixed constant d-then there are only d i=0 n i = O(n d ) (multilinear) monomials, and so (as long as the coefficients are reasonably small) we have a polynomial-size representation. We assume that an ordering of the monomials has been fixed (e.g., in the representation) such that monomials with larger degree are considered "larger" in the ordering. We refer to the first monomial in this ordering with a nonzero coefficient as the leading monomial in a polynomial. We will refer to the degree of a polynomial calculus or PCR proof as the maximum degree of any polynomial appearing in a formula used in the proof. We observe that width-w resolution can be simulated by degree-w PCR proofs; thus, in a sense, degree-bounded polynomial calculus is a natural generalization of width-w resolution.
Degree-bounded polynomial calculus in particular was also first studied by Clegg et al. [11]. The central observation is that the polynomials derivable in bounded degree polynomial calculus form a vector space; the decision algorithm (given as Algorithm 4) will then simply construct a basis for this space and use the basis to check if the query lies within the space.
Theorem 24 (Analysis of decision algorithm for degree-d PC/PCR -Theorem 3, [11]) Algorithm 4 solves the limited decision problem for degree-d polynomial calculus (resp. PCR). It runs in time O((n d + ℓ)n 2d ) where n is the number of indeterminates (variables for polynomial calculus, literals for PCR).
As the proof appears in the work of Clegg et al. [11], we refer the reader there for details. Clegg et al. [11] also give another algorithm based on the Gröbner basis algorithm that does not compute an entire basis. Although their analysis gives a worse worst-case running time for this alternative algorithm, they believe that it may be more practical; the interested reader should consult the original paper for details.
In any case, we now return to pursuing our main objective, using Algorithm 4 to obtain algorithms for implicit learning from examples in polynomial calculus and PCR. We first need to know that the degree-d restrictions of these proof systems are restriction-closed, which turns out to be easily established: Proposition 25 For both polynomial calculus and PCR, the sets of proofs of degree d are restrictionclosed.
Proof: We noted in Proposition 23 that the restriction of any polynomial calculus (resp. PCR) proof is a valid polynomial calculus (resp. PCR) proof. Let any partial assignment ρ be given; recalling the connection between monomials and conjunctions, we note that for any monomial x i 1 · · · x i k k ≤ d appearing in a formula in a degree-d polynomial calculus or PCR proof, the restriction under ρ is 0 (of degree 0) if any x i j is set to 0 by ρ, and otherwise it is j:ρ(x i j )= * x i j , which has degree at most k ≤ d. Thus, the degrees can only decrease, so the restriction of the proof under ρ is also a degree-d proof.
We therefore obtain the following corollary from Theorem 13: Corollary 26 (Implicit learning in degree-bounded polynomial calculus and PCR) Let a list of degree-d polynomials p 1 , . . . , p ℓ and q be given, and suppose that partial assignments are drawn from a masking process for an underlying distribution D; suppose further that either 1. There exists some list of polynomials h 1 , . . . , h k such that partial assignments from the masking process are witnessed to satisfy [h 1 = 0], . . . , [h k = 0] with probability at least (1 − ǫ + γ) and there is a degree-d polynomial calculus (resp. PCR) derivation of Then, there an algorithm running in time O( ℓ+n d γ 2 n 2d log 1 δ ) (given unit cost field operations) that distinguishes these cases with probability 1 − δ when given q, p 1 , . . . , p ℓ , ǫ, γ, and a sample of O( 1 γ 2 log 1 δ ) partial assignments.

Sparse, bounded cutting planes
In integer linear programming, one is interested in determining integer solutions to a system of linear inequalities; cutting planes [23] were introduced as a technique to improve the formulation of an integer linear program by deriving new inequalities that are satisfied by the integer solutions to the system of inequalities, but not by all of the fractional solutions. The current formulation of cutting planes is due to Chvátal [10], and it was explicitly cast as a propositional proof system by Cook et al. [12] where the objective is to prove that a system has no feasible integer solutions. Much like resolution, cutting planes are not only simple and natural, surprisingly, they are also complete [10,12]. Furthermore, Cook et al. [12] noted that cutting planes could easily simulate resolution, and that some formulas that were hard for resolution (encoding the "pigeonhole principle") had simple cutting plane proofs. We can also give a syntactic analogue of bounded-width in resolution for cutting planes which will enable us to state a limited decision problem with an efficient algorithm. Although this restriction of cutting planes will not be able to express the hard examples for resolution, their simplicity and connections to optimization make them a potentially appealing direction for future work.
The cutting planes proof system. The formulas of cutting planes are inequalities of the form where each x i is a variable and c 1 , . . . , c k and b are integers. Naturally, we will restrict our attention to {0, 1}-integer linear programs (i.e., Boolean-valued), so our system will feature axioms of the form x ≥ 0 and −x ≥ −1 (i.e., x ≤ 1) for each variable x. Naturally, we will allow the addition of two linear inequalities: given (2) ]. We will also allow ourselves to multiply an inequality . Finally, the key rule is division: given an inequality of the form for a positive integer d (i.e., a common divisor of the coefficients) we can derive [ k i=1 c i x i ≥ ⌈b/d⌉]; crucially, this derivation is only sound due to the fact that the x i are assumed to take integer values. It is the fact that this rounding may "cut" into the region defined by the system of linear inequalities that gives the proof system its name. A refutation in cutting planes is a derivation of the (contradictory) inequality [0 ≥ 1].
Again, we will need to make some technical modifications that do not change the power of the proof system by much. We will encode 1 as an axiom by the inequality 0 ≥ −1 which, we note, can be trivially derived in two steps by the standard formulation of cutting planes. We will also introduce a weakening rule: consider any linear inequality (1) ] that is witnessed true in every partial assignment, specifically in the one that masks all variables-this means that (1) ] could be derived from the axioms in at most 3n + 2 steps if there are n variables while using only two formulas' worth of space, whereupon the final inequality follows by addition.
We will also find the following observation convenient: as restrictions are a kind of partial evaluation, it is intuitively clear that we can perform the evaluation in stages and obtain the same end result, that is: Proposition 27 (Restrictions may be broken into stages) Let ρ be a partial assignment, and let σ be another partial assignment such that for every variable x i , whenever ρ i = * , σ i = * , and whenever σ i ∈ {0, 1}, σ i = ρ i . Now, let τ be a partial assignment to the variables {x i : σ i = * } such that for every x i , σ i = ρ i . Then for every formula ϕ, ϕ| ρ = (ϕ| σ )| τ .
Proof: We can verify this by induction on the construction of ϕ: • Naturally, for variables x i , either ρ i = * , in which case in which case either σ i = ρ i , or else x i | σ = x i , and then τ i = ρ i .
, we again have by the induction hypothesis that for every ψ i , ψ i | ρ = (ψ i | σ )| τ , and thus, the same ψ i are witnessed (to evaluate to true or false) in both cases.
-If ϕ is witnessed in ρ, but not witnessed in σ, we observe that ϕ must be witnessed in τ since the same set of formulas are witnessed to evaluate to true and false in both cases, and therefore also again, ϕ| ρ = (ϕ| σ )| τ .
-Finally, when ϕ is witnessed in σ, we note that by the construction of witnessed values, it does not matter what values the formulas witnessed by ρ but not σ take-ϕ must be witnessed to take the same value under both ρ and σ. Then since (ϕ| σ )| τ = ϕ| σ ∈ {0, 1}, we see once again (ϕ| σ )| τ = ϕ| ρ .

Proposition 28
Cutting planes is restriction-closed.
Proof: We are again given that our encoding of 1, 0 ≥ −1, is an axiom. Now, let any partial assignment ρ be given. Again, for any hypothesis ϕ, asserted in the proof, ϕ| ρ can be asserted from the set of restrictions of hypotheses. Likewise, for each axiom, if ρ assigns the variable a value, then it simplifies to 1 (which is given as an axiom by assumption) and otherwise it remains an assertion of the same axiom, so in either case it may still be asserted as an axiom. It thus remains to consider formulas derived by our four inference rules. We thus consider any formula ϕ derived in the proof that is not witnessed to evaluate to true in ρ. If it was derived from a formula ψ by weakening, we note that if ψ| ρ = 1 (i.e., was witnessed to evaluate to true), then since ϕ is the sum of ψ and another inequality ξ that is witnessed to evaluate to true, we would have ϕ| ρ = 1 also, but it is not by assumption. Therefore also ψ| ρ = 1. Furthermore, by Proposition 27, ξ| ρ is (also) witnessed true on every further partial assignment. Therefore, ϕ| ρ = (ψ + ξ)| ρ follows from ψ| ρ by weakening (with ξ| ρ ). Similarly, if ϕ was derived by addition of ψ and ξ, at least one of ψ and ξ must not be witnessed to evaluate to 1 under ρ; WLOG suppose it is ψ. Then if ξ| ρ = 1, ϕ| ρ again follows from ψ| ρ by weakening. Finally, if neither ψ nor ξ is witnessed to evaluate to true under ρ, we can derive ϕ| ρ from ψ| ρ and ξ| ρ by addition.
Multiplication is especially simple: we note , then ψ also follows from ϕ by division, and hence ϕ| ρ = 1 iff ψ| ρ = 1 in this case; as we have assumed ϕ| ρ = 1, we note that we can derive ϕ| ρ from ψ| ρ by multiplication by the same d.
by division, we note (more carefully) that if ψ| ρ = 1, then as this means that i:ρ i =1 min{0, d · c i } ≥ b where the LHS is an integer, and hence also i:ρ i =1 min{0, c i } ≥ ⌈b/d⌉, so ϕ would also be witnessed to evaluate to true, but we have assumed it does not. Now, we note that

Efficient algorithms for sparse, ℓ 1 -bounded cutting planes
We now turn to developing a syntactic restriction of cutting planes that features an efficient limited decision algorithm.
Sparse cutting planes. The main restriction we use is to limit the number of variables appearing in the threshold expression: we say that the formula is w-sparse if at most w variables appear in the sum. 2 Naturally, we say that a cutting planes proof is w-sparse if every formula appearing in the proof is w-sparse. ℓ 1 -bounded coefficients. We will also use a restriction on the magnitude of the (integer) coefficients. Given a formula of cutting planes, ϕ = [ k i=1 c i x i ≥ b], we define the ℓ 1 -norm of ϕ (denoted ϕ 1 ) to be |b| + k i=1 |c i |, i.e., the ℓ 1 norm of the coefficient vector. For L ∈ N, we naturally say that a cutting planes proof is L-bounded if every ϕ appearing in the proof has ϕ 1 ≤ L.
We remark that the natural simulation of width-w resolution by cutting planes yields w-sparse and 2w-bounded proofs: intuitively, we wish to encode a clause C = ℓ 1 ∨ · · · ∨ ℓ k by the linear inequality which naturally corresponds to the cutting planes formula in which, if k ≤ w, the coefficients from the LHS contribute at most w to the ℓ 1 -norm, and the threshold is easily seen to contribute at most w (assuming w ≥ 1). So, a simultaneously sparse and ℓ 1 -bounded restriction of cutting planes generalizes the width-bounded restriction of resolution.
We furthermore need to know that this special case of cutting planes is restriction-closednote that other natural special cases, e.g., bounding the sizes of individual coefficients may not be. Nevertheless, for the ℓ 1 -bounded cutting planes, this is easily established:

Proposition 29
The class of L-bounded w-sparse cutting plane proofs is restriction closed for any L, w ∈ N.
Proof: Let any L-bounded w-sparse cutting plane proof Π and partial assignment ρ be given. We consider the proof Π| ρ obtained by restricting every step of Π by ρ (shown to be a cutting planes proof in Proposition 28). Now, we note that in this proof, our encoding of 1 as [0 ≥ −1] is 0-sparse and 1-bounded, so it is guaranteed to be L-bounded and w-sparse. More generally, given any ϕ that is L-bounded and w-sparse, by the triangle inequality; as furthermore 0 ≤ i:ρ i =0 |c i |, we conclude that ϕ| ρ 1 ≤ ϕ 1 ≤ L, so Π| ρ is also L-bounded. Similarly, since every variable appearing in ϕ| ρ appears in ϕ and ϕ appearing in Π are assumed to be w-sparse, ϕ| ρ appearing in Π| ρ are also w-sparse. Thus, Π| ρ is also a w-sparse cutting planes proof, as needed.
We now consider Algorithm 5, an analogue of Algorithm 3 -i.e., a simple dynamic programming algorithm -for the limited decision problem for w-sparse and L-bounded cutting planes.
Theorem 30 (Analysis of decision algorithm for sparse, bounded cutting planes) For any w, L ∈ N, Algorithm 5 solves the limited decision problem for w-sparse L-bounded cutting planes. It runs in time O((w + max{|φ i |})L(Ln) w (L(Ln) w + ℓ) 2 ) (which, for w constant and w-sparse L-bounded φ i is O(L 3 (Ln) 3w )) where n is the number of variables.
Proof: The analysis is very similar to our previous dynamic programming algorithms for boundedwidth RES(k), Theorem 20. As there, we are inductively guaranteed that at each stage we set T [ψ] to 1 only when there is a w-sparse L-bounded proof of ψ, and conversely, for every ψ with a wsparse L-bounded proof, until T [ψ] is set to 1, on each iteration of the main loop, we set an entry of T to 1 for some new step of the proof (we noted that weakening could be simulated by repeated addition of axioms, so we don't need to consider it explicitly). Thus, if the input target φ has a w-sparse L-bounded proof, T [φ] would be set to 1 at some point, whereupon the algorithm accepts, and otherwise since the size of the table is bounded, the algorithm eventually cannot add more formulas to the table and so rejects. It only remains to consider the running time.

The utility of knowledge with imperfect validity
Although our introduction of PAC-Semantics was primarily motivated by our need for a weaker guarantee that could be feasibly satisfied by inductive learning algorithms, it turns out to provide a windfall from the standpoint of several other classic issues in artificial intelligence. Several such examples are discussed by Valiant [50]; 3 we will dwell on two core, related problems here, the frame and qualification problems, first discussed by McCarthy and Hayes [39]. The frame problem essentially concerns the efficient representation of what changes -and what doesn't -as the result of an action (stressed in this form by Raphael [44]). The traditional solutions to this problemfirst suggested by Sandewall [48], with a variety of subsequent formalizations including notably, McCarthy's circumscription [37,38] and Reiter's defaults [45] and "successor state axioms" [46] -all essentially are (informally) captured by asserting in one way or another that (normally) "nothing changes unless an action that changes it is taken." Putting the early methods such as circumscription and defaults aside (which have their own issues, cf. Hanks and McDermott's "Yale shooting problem" [24]), the other approaches make the above assertion explicit, and thus encounter some form of the qualification problem-that is, it is essentially impossible to assert the full variety of reasons for and ways in which something could change or fail to change in a real-world situation. Thus, the successor state axioms (etc.) fully capture a toy domain at best. And yet, such simplified models have shown to be useful in the design of algorithms for planning-implicitly in early work such as Fikes and Nilsson's STRIPS [19], and more explicitly in later work such as Chapman's "modal truth criterion" in his work on partial-order planning [9] and as explicit constraints in planning as propositional satisfiability by Kautz and Selman [26,27]. Indeed, such approaches "solve the problem" in the sense that the kinds of plans generated by such systems are intuitively reasonable and correspond to what is desired.
More to the point, we can take the stance that such assumptions are merely approximations to the real-world situation that may fail for various unanticipated reasons, and so while the plans generated on their basis may likewise fail for unanticipated reasons, this does not detract from the utility of the plans under ordinary circumstances. Indeed, supposing we take a discrete-time probabilistic (e.g., Markovian) model of the evolution of the world, we might reasonably expect that if we consider the marginal distribution over successive world states, that formulas such as the successor state axioms would be (1 − ǫ)-valid with respect to this distribution for some small (but nonzero) ǫ. Of course, this view of the solutions to the frame problem is not novel to this work, and it has been expressed since the earliest works on probabilistic models in planning [15,21]. The point is rather that such examples of what are effectively (1 − ǫ)-valid rules arise naturally in applications, and we claim that just as PAC-Semantics captures the sense in which learned rules are (approximately) "true," PAC-Semantics also captures the sense in which these approximate rules (e.g., as used in planning) are "true." 6 Directions for future work A broad possible direction for future work involves the development of algorithms for reasoning in PAC-Semantics directly, that is, not obtained by applying Theorem 13 to algorithms for the limited decision problems under the classical (worst-case) semantics of the proof systems. We will give some concrete suggestions for how this might be pursued below.

Incorporating explicit learning
One approach concerns the architecture of modern algorithms for deciding satisfiability; a wellknown result due to Beame et al. [5] establishes that these algorithms effectively perform a search for resolution proofs of unsatisfiability (or, satisfying assignments), and work by Atserias et al. [3] shows that these algorithms (when they make certain choices at random) are effective for deciding bounded-width resolution.
The overall architecture of these modern "SAT-solvers" largely follows that of Zhang et al. [52], and is based on improvements to DPLL [14,13] explored earlier in several other works [36,4,22]. Roughly speaking, the algorithm makes an arbitrary assignment to an unassigned variable, and then examines what other variables must be set in order to satisfy the formula; when a contradiction is entailed by the algorithm's decision, a new clause is added to the formula (entailed by the existing clauses) and the search continues on a different setting of the variables. A few simple rules are used for the task of exploring the consequences of a partial setting of the variables-notably, for example, unit propagation: whenever all of the literals in a clause are set to false except for one (unset) variable, that final remaining literal must be set to true if the assignment is to satisfy the formula.
One possibility for improving the power of such algorithms for reasoning under PAC-Semantics using examples is that one might wish to use an explicit learning algorithm such as WINNOW [34] to learn additional (approximately valid) rules for extending partial assignments. If we are using these algorithms to find resolution refutations, then when a refutation was produced by such a modified architecture, it would establish that the input formula is only satisfied with some low probability (depending on the error of the learned rules that were actually invoked during the algorithm's run).
Given such a modification, one must then ask: does it actually improve the power of such algorithms? Work by Pipatsrisawat and Darwiche [43] (related to the above work) has shown that with appropriate (nondeterministic) guidance in the algorithm's decisions, such algorithms do actually find arbitrary (i.e., DAG-like) resolution proofs in a polynomial number of iterations. Yet, it is still not known whether or not a feasible decision strategy can match this. Nevertheless, their work (together with the work of Atserias et al. [3]) provides a potential starting point for such an analysis.

A suggestion for empirical work
Another obvious direction for future work is the development and tuning of real systems for inference in PAC-Semantics. While the algorithms we have presented here illustrate that such inference can be theoretically rather efficient and are evocative of how one might approach the design of a realworld algorithm, the fact is that (1) any off-the-shelf SAT solver can be easily modified to serve this purpose and (2) SAT solvers have been highly optimized by years of effort. It would be far easier and more sensible for a group with an existing SAT solver implementation to simply make the following modification, and see what the results are: along the lines of Algorithm 2, for a sample of partial assignments {ρ 1 , . . . , ρ m }, the algorithm loops over i = 1, . . . , m, taking the unmasked variables in ρ i as decisions and checks for satisfiability with respect to the remaining variables. Counting the fraction of the partial assignments that can be extended to satisfying assignments then gives a bound on the validity of the input formula. Crucially, in this approach, learned clauses are shared across samples. Given that there is a common resolution proof across instances (cf. the connection between SAT solvers and resolution [5]) we would expect this sharing to lead to a faster running time than simply running the SAT solver as a black box on the formulas obtained by "plugging in" the partial assignments (although that is another approach).

Exploiting limited kinds of masking processes
Another direction for possibly making more sophisticated use of the examples in reasoning under PAC-Semantics involves restricting the masking processes. In the pursuit of reasoning algorithms, it might be helpful to consider restrictions that allow some possibility of "extrapolating" from the values of variables seen on one example to the values of hidden variables in other examples (which is not possible in general since the masking process is allowed to "see" the example before choosing which entries to mask). For example, if the masks were chosen independently of the underlying examples, this might enable such guessing to be useful.

Relating implicit learning to query-driven explicit learning
A final question that is raised by this work is whether or not it might be possible to extend the algorithm used in Theorem 13, Algorithm 1, to produce an explicit proof from an explicit set of formulas that are satisfied with high probability from e.g., algorithms for finding treelike resolution proofs even when the CNF we need is not perfectly valid. Although this is a somewhat ambitious goal, if one takes Algorithm 1 as a starting point, the problem is of a similar form to one considered by Dvir et al. [16]-there, they considered learning decision trees from restrictions of the target tree. The main catch here is that in contrast to their setting, we are not guaranteed that we find restrictions of the same underlying proof, even when one is assumed to exist.
or Pr x∈D [α(x) = 0] ≥ ǫ + γ (given that one of these cases holds) in time polynomial in the size of the domain, 1/γ, log 1/δ, log 1/ǫ, and the size of α. We refer to this algorithm as an efficient PAC-Certification of W for A, and it serves as a kind of efficient evaluation algorithm for W .
We now restate these observations more formally: any notion of "witnessing" underlying an implicit learning algorithm in the style of Theorem 13 must be efficiently evaluable on partial assignments and therefore also verifiable from examples.
Proposition 32 (Witnessing of axioms must be computationally feasible) Let S be a set of proofs for a proof system such that any explicit hypothesis has a proof in S. Let A be a set of formulas and W be a property of formulas.
Suppose that there is a probabilistic algorithm running in time polynomial in the number of variables n, the size of the query and set of hypotheses, 1/γ, and the number of bits of precision of the parameters ǫ and δ with the following behavior: given a query formula ϕ, ǫ, δ, γ ∈ (0, 1), query access to example partial assignments from a masking process M over a distribution over assignments D, and a list of hypothesis formulas H, distinguishes Then there is a probabilistic polynomial time algorithm that on input α ∈ A and ρ distinguishes pairs for which W holds from pairs for which there is some x consistent with ρ such that α(x) = 0.
Proof: We will first argue that W has efficient PAC-Certification for A. Following the argument sketched above, let any α ∈ A and ǫ, δ, γ ∈ (0, 1) be given. We then simply run our hypothetical algorithm with query α and H empty. We know that this algorithm then runs in time polynomial in |α|, 1/γ, log 1/δ, and log 1/ǫ. Furthermore, if α is not (1 − ǫ − γ)-valid (i.e., Pr x∈D [α(x) = 0] ≥ ǫ + γ), then we know the algorithm must detect this with probability 1 − δ. Likewise, if α satisfies Pr ρ∈M (D) [W (α, ρ)] ≥ 1 − ǫ + γ, then for A ′ = {α}, there is a proof of α from A ′ in S and our algorithm is guaranteed to recognize that we are in the second case with probability 1 − δ. So we see that the efficient PAC-Certification of W for A is immediate.
Let any partial assignment ρ be given, and consider the family of point distributions D y for y consistent with ρ with the masking process M that obscures precisely the entries hidden in ρ. Then for every such y, the distribution M (D y ) is a point distribution that produces ρ with probability 1. Consider the behavior of the algorithm for efficient PAC-Certification of W for A given access to such a distribution (which is trivially simulated given ρ) with say ǫ = 1/2, γ = 1/4.
Suppose that ρ is consistent with some y for which α(y) = 0. Then in such a case, Pr x∈Dy [α(x) = 0] = 1 ≥ ǫ+γ, so when given examples from M (D y ) (and hence, when given ρ as every example) the algorithm must decide that the second case holds. Now, suppose on the other hand that W (α, ρ) holds; then since our distribution produces ρ with probability 1, the algorithm must decide the first case holds. Thus, our modified algorithm is as needed for the first part.
For the second part, we note that running the algorithm from the first part on each example and each partial assignment from a sample of size O(1/γ 2 log 1/δ), and checking whether the fraction of times W was decided to hold for all k formulas exceeded 1 − ǫ suffices to distinguish the two cases by the usual concentration bounds.
Our notion of witnessed values is clearly one that suffices for any family of axioms A. By contrast, we now see that for example, we cannot in general take W to be the collection of pairs (α, ρ) such that for every x consistent with ρ α(x) = 1 -arguably, the most natural candidate (and in particular, the notion originally used by Michael [40]) -since this may be NP-complete, e.g., for 3-DNF formulas, and so is presumably not feasible to check. (We remark that our notion actually coincides with this one in the case of CNF formulas, which is the relevant class of formulas for the resolution proof system.)

B On the analysis of the algorithm for bounded-space treelike resolution
We note that we can associate an optimal clause space to a given derivation using the following recurrence (often used to define the equivalent pebble number of a tree):

Proposition 33
The optimal space derivation for a treelike resolution proof corresponding to a given tree can be obtained recursively as follows: • The space of a single node is 1.
• The space of the root of a tree with two subtrees derivable in space s is s + 1.
• The space of the root of a tree with subtrees derivable in space s > s ′ is s.

Proof:
We proceed by induction on the structure of the tree, of course, and a proof of a clause must assert that clause in the final step, so any proof must use one clause's worth of space (which is attained for the sources -axioms -of the proof). Furthermore, it is clear that for any node of a tree, given that the formula holds for the subtrees rooted at that node, the formula continues to hold: if one subtree requires more space than the other, we can derive the clause labeling the root of the former tree in space s, and retaining that clause on the backboard, we can carry out the space s ′ derivation for the other subtree on the blackboard utilizing total space s ′ + 1 ≤ s. This derivation is optimal since the proof derives the clauses labeling the roots of both subtrees, and therefore it requires at least as much space as the derivation of either subtree. If the subtrees both require space s, then using a derivation similar to the one described above (for the subtrees in arbitrary order) gives a space s + 1 derivation of the root. To see that this is optimal, we first note that if the blackboard is ever empty during a resolution proof, we could eliminate any steps prior to the step with the empty blackboard, and still obtain a legal proof, so we assume WLOG that the derivation when restricted to either of the subtrees always include at least one clause. We next note that in any derivation of one of the subtrees, by the induction hypothesis, there must be some blackboard configuration that contains s clauses. If this occurs during a derivation of the other subtree in the overall derivation, then the overall derivation uses at least s + 1 space. If it does not, then the conclusion of this derivation (the root of the subtree) must remain on the blackboard for use in the final step of the proof; therefore, at a configuration of the blackboard in the derivation of the other subtree with at least s clauses, at least s + 1 clauses appear on the blackboard in the overall derivation.
Actually, Ansótegui et al. [2] refer to the clause space for treelike resolution as the Horton-Strahler number after the discoverers of the corresponding combinatorial parameter on trees [25,49] (which again happens to be essentially the same as the "pebble number" of the tree). The algorithm for efficient proof search -SearchSpace, Algorithm 2 -was, to the best of our knowledge, first essentially discovered as an algorithm for learning decision trees (of low pebble number) by Ehrenfeucht and Haussler [17], (we remark that the connection between treelike resolution and decision trees is an old bit of folklore, first appearing in the literature in a work by Lovász et al. [35]) and rediscovered in the context of resolution by Kullmann [33]; the algorithm used by Beame and Pitassi [6] is also essentially similar, although they only considered the resulting proof tree size (not its space).
Although the analysis of SearchSpace is, at its heart, a fairly straightforward recurrence, it requires some groundwork. We first note that whenever a bounded space treelike resolution proof exists, it can be converted into a (normal) form that can be discovered by SearchSpace: Definition 34 (Normal) We will say that a resolution proof is normal if in its corresponding DAG: 1. All outgoing edges from Cut nodes are directed to Cut nodes. 2. The clauses labeling any path from the sink to a Cut node contain literals using every variable along the path. 3. A given variable is used in at most one cut step and at most one weakening step along every path from a source to a Cut node.

Proposition 35
For any space-s treelike resolution proof Π there is a normal space-s treelike resolution proof Π ′ .

Proof:
First note that in general, we don't need to use weakening steps in the proof, except perhaps on some initial path from a source: all other occurrences can be eliminated by deleting the introduced literal along the path to the sink until either a node is encountered in which the other incoming edge is from a clause that also features that literal or which applies the cut rule on that variable, redirecting the edge on this path to the cut node past it towards the sink in the latter case (eliminating the other branch of the proof), and then finally replacing the weakening node with the node leading to it. This transformation does not increase the clause space of a proof and leaves a treelike proof treelike.
Once the weakening steps have been removed (i.e., in the proof cut nodes only have outgoing edges to other cut nodes) we can see that on any path from the sink to any cut node, at most one literal is introduced at each step; in particular, the set of literals on the path leading to any cut node is a superset of the literals in the cut node. Note that we can obtain a proof of the same clause space in which the internal nodes are all labeled with the clauses consisting of these sets of literals, by adding some additional weakening steps between the sources of the proof and the first cut node. Since these steps leave these chains at clause space 1, the clause space is preserved, and a treelike proof is still treelike.
Finally, to guarantee the third property, we show how to eliminate additional mentions of a variable. While the proof is not normal, identify some offending path. For the subtree rooted at the occurrence of the label closest to the source of this path, replace this subtree with its child subtree labeled with the same clause (note that one such subtree must exist since this literal is already mentioned in the clause). Note that the result is still a treelike resolution proof, and moreover, since the child subtree has clause space no greater than the clause space of the original subtree, the clause space of the new proof cannot increase.
We now describe the proof of Theorem 16.
Theorem 36 (SearchSpace finds space-s treelike proofs when they exist) If there is a spaces treelike proof of a clause C from a CNF formula ϕ, then SearchSpace returns such a proof, and otherwise it returns "none." In either case, it runs in time O(|ϕ| · n 2(s−1) ) where n is the number of variables.
Proof: Recalling Proposition 33, in any normal space-s treelike derivation of a clause C, one of the clauses involved in the final step must be derivable in space at most s − 1. It therefore clear that SearchSpace can find any normal space-s treelike proof by tracing paths from the root, choosing a literal labeling one of the clauses derivable in strictly smaller space first. By Proposition 35, this is sufficient, and all that remains is to check the running time.
We now establish that the bounded-space algorithm efficiently finds treelike proofs; we first recall the statement of Proposition 18.
Proposition 37 A treelike proof Π can be carried out in clause space at most log 2 |Π| + 1.