1 Preface
Cirquent calculus is a family of deep inference (cf. [1]) proof systems permitting various sorts of componentsharing between different parts of logical expressions. The earlier article [8] constructed a cirquent calculus system CL16 for the elementarybase, recurrencefree propositional fragment of computability logic (the gamesemantically conceived logic of computational problems introduced in [2]) and proved its soundness and completeness. The present article takes that result to the firstorder level, with the so called choice quantifiers. The resulting system CL17, in contrast to its classical counterpart, is a decidable predicate logic. While a variety of propositional systems have been built by now in cirquent calculus [3, 4, 6, 7, 8, 9, 10, 11], CL17 is the first cirquent calculus system with quantifiers. The formal semantics for its language (and beyond) was set up in [5], but no axiomatizations had been attempted so far.
Being a continuation of [8] in the proper sense, the present article should only be read in combination with its predecessor, as it relies on but does not reintroduce the main concepts from [8]. Nor does it discuss related literature or the relevant motivations and philosophy underlying cirquent calculus and computability logic, as this, again, is done in [8].
The language of CL17 extends that of CL16 by augmenting its logical vocabulary with the choice universal quantifier (“chall”) and choice existential quantifier (“chexists”), and allowing atoms of any arities. Throughout this article, for simplicity, we assume that the universe of discourse is always the set of natural numbers, by innocent abuse of concepts identified with the corresponding decimal numerals. If so, is the game where, at the beginning of a play, the environment chooses one of , after which the game continues as ; if such a choice is never made, then the environment loses. is similar, only here it is the machine who can and must make an initial choice. Thus, is in fact nothing but the infinite choice conjunction , and is the infinite choice disjunction .
2 Syntax
The language of CL17 is the same as that of firstorder classical logic, only with the quantifiers replaced by their choice (“constructive”) counterparts , and additionally including the choice connectives as well as the decimal numerals referred to as constants. We will be typically using as metavariables for the variables of the language, for its predicate letters, and for its constants.
We fix four pairwise disjoint infinite sets , , and , whose elements will be referred to as clusters, clusters, clusters and clusters, respectively. The Gothic letters will be used as metavariables for clusters.
A term is either a variable or a constant. A nonlogical atom is , where is an ary predicate letter and are terms. A nonlogical literal is either or , where is a nonlogical atom. The expressions and are said to be logical literals. A (choice) universal quantor (resp. existential quantor) is the expression (resp. ), where is a  (resp. ) cluster.
Definition 2.1
A cirquent is defined inductively as follows:

Each (logical or nonlogical) literal is a cirquent.

If and are cirquents, then is a cirquent.

If and are cirquents, then is a cirquent.

If and are cirquents and is a cluster, then is a cirquent.

If and are cirquents and is a cluster, then is a cirquent.

If is a cirquent, is a variable and is a cluster, then is a cirquent.

If is a cirquent, is a variable and is a cluster, then is a cirquent.
A cirquent of the form is said to be rooted, a cirquent of the form is said to be rooted, and similarly for . If we simply say “rooted”, it should be understood as “rooted for whatever ”. Similarly for .
As in [8], negation is only allowed to be applied to atoms. should be understood as an abbreviation of , and as an abbreviation of . All other conventions of [8] regarding the usage of and remain in force.
When omitting parentheses in cirquents, our convention is that , and have the highest precedence, then comes , then and , and then and .
All (other) standard terminological and notational conventions of traditional logic also remain in force. This includes the concepts of free and bound occurrences of variables, or the practice of representing a cirquent as when first mentioning it, and then writing to mean the result of replacing in all free occurrences of the variable by the term . A cirquent is said to be closed iff it has no free occurrences of variables.
3 Semantics
We (re)define LegalRuns as the set of all runs satisfying the following conditions:

Every move of is the string , where either (1) is a  or cluster and , or (2) is a  or cluster and .

Whenever contains a move where is a  or cluster, the move is labeled.

Whenever contains a move where is a  or cluster, the move is labeled.

For any cluster , contains at most one move of the form .
The intuitive meaning of condition 1 is that every move signifies either a choice between “left” () and “right” () in a  or cluster, or a choice among the constants in some  or cluster. Conditions 2 and 3 say that the environment moves (chooses) only in  or clusters, and the machine only in  or clusters. Finally, condition 4 says that, in any given cluster, a choice can be made only once.
As in [8], given a run , we say that a cirquent of the form or is resolved iff contains one of the moves or ; then by the resolvent of the cirquent we mean if such a move is , and if it is . Extending this terminology to quantifiers, we say that a cirquent of the form or is resolved iff contains the move for some constant ; then by the resolvent of such a cirquent we mean . Sometimes, instead of saying that the cirquent (or , or , or ) is resolved, we may simply say that the cluster is resolved. In all cases, as expected, “unresolved” means “not resolved”.
An interpretation is a function that assigns to every ary predicate letter a relation . When , we say that makes the atom true, or simply that is true. As usual, “false” means “not true”. The concepts of truth and falsity extend to , and all combinations of closed atoms in the standard way: is always true; is always false; is true iff is false; is true iff both and are true; is true iff at least one of is true. When a cirquent is represented as , we usually write instead of .
Remember from [8] that, when we say “won” without specifying a player (as in the following definition), it always means “won by the machine”. Similarly for “lost”.
Definition 3.1
Every closed cirquent and interpretation induces a unique game , which we refer to as “ under ”, defined as follows. The set of legal runs of such a game is nothing but LegalRuns. Since does not depend on or , subsequently we shall simply say “legal run” rather than “legal run of ”. The component of the game is defined by stipulating that a legal run is a won run of iff one of the following conditions is satisfied:
1. is a literal and is true.
2. has the form (resp. ) and, for both (resp. at least one) , is a won run of .
3. is a resolved , ,  or rooted cirquent and, where is the resolvent, is a won run of .
4. is a unresolved  or rooted cirquent.
When an interpretation is fixed in the context or is irrelevant, by abuse of notation we may omit explicit references to it, and identify a cirquent with the game . For instance, we may say that the machine wins instead of saying that the machine wins under .
Definition 3.2
Consider a closed cirquent .
1. For an interpretation , a solution of under , or simply a solution of , is an HPM such that . We say that is computable under , or simply that is computable, iff has a solution.
2. A logical solution of is an HPM such that, for any interpretation , is a solution of . We say that is (logically) valid if it has a logical solution; otherwise is invalid.
4 Axiomatics
Just like CL16, our present system CL17 has as its only axiom. The inference rules of CL17 are listed below, where all notational conventions from [8] remain in force. Note that all rules of CL16 are also rules of CL17, even if “somewhat” renamed.
 Porcommutativity:

.
 Pandcommutativity:

.
 Porassociativity:

.
 Pandassociativity:

.
 Poridentity:

.
 PandIdentity:

.
 Pordomination:

.
 Panddomination:

.
 Left chorchoosing:

, where , , are all rooted subcirquents of the conclusion.
 Right chorchoosing:

, where , , are all rooted subcirquents of the conclusion.
 Chexistschoosing:

where is any constant and are all rooted subcirquents of the conclusion.
 Left chandcleansing:

.
 Right chandcleansing:

.
 Challcleansing:

.
 Panddistribution:

.
 Chanddistribution:

.
 Challdistribution:

, where has no free occurrences in .
 Trivialization:

, where is a nonlogical atom.
 Chandchotomy:

where does not occur in the conclusion.
 Challchotomy:

where does not occur in the conclusion, has no free occurrences in and has no free occurrences in .
 Chandallchotomy:

where does not occur in the conclusion and has no free occurrences in .
 Chandsplitting:

, where neither nor has occurrences of .
 Challsplitting:

, where neither nor has occurrences in .
We will be using the word “Commutativity” as a common name of Porcommutativity and Pandcommutativity. Similarly for all other rules. Throughout the rest of this article, “ is provable” always means “ is provable in CL17”, written .
Example 4.1
The cirquent can be shown to be unprovable. However, it becomes provable if the two clusters and are the same. Below is a proof of , i.e., of .
1. Axiom
2. Pandidentity: 1
3. Trivialization: 2 (twice)
4. Panddistribution: 3
5. Chexistschoosing: 4
6. Challsplitting: 5
7. Challdistribution: 6
8. Chandsplitting: 7,7
9. Chanddistribution: 8
10. Challcleansing: 9 (twice)
11. Challchotomy: 10
5 The preservation lemma
A surface occurrence of a subcirquent or an operator in a given cirquent is an occurrence which is not in the scope of a choice operator (i.e., of , , or for whatever ).
Definition 5.1
Given a closed cirquent and a legal run , the residue of is the free cirquent obtained from as a result of repeatedly replacing until no longer possible:
1. every surface occurrence of every resolved , ,  or rooted subcirquent by its resolvent;
2. every surface occurrence of every unresolved  or rooted subcirquent by ;
3. every surface occurrence of every unresolved  or rooted subcirquent by .
Lemma 5.2
Consider any closed cirquent , interpretation and legal run . Let be the residue of . Then is a won (by the machine) run of iff is true.
Proof. Let , , , be as above. We proceed by induction on the complexity of .
If is a literal, then . Hence, from clause 1 of Definition 3.1 (and the fact that all other clauses of that definition are about nonliteral cases), is a won run of iff is true.
If is of the form , then obviously , where is the residue of and is the residue of . By Definition 3.1, is a won run of iff it is a won run of both and . But, by the induction hypothesis, is a won run of both and iff both and are true. “Both and are true”, in turn, means nothing but that , i.e., , is true.
The case of having the form will be handled similarly.
Suppose is of the form . If is unresolved, then, by clause 4 of Definition 3.1, is a won run of . But then, as desired, is true because . Now suppose is resolved. Without loss of generality we may assume that the resolvent is . Notice that then is the residue of not only but also of . We have: is a won run of iff (by clause 3 of Definition 3.1) it is a won run of iff (by the induction hypothesis) is true, as desired.
The remaining cases of having the form , or will be handled similarly.
Lemma 5.3
1. Each application of any of the rules of CL17 preserves logical validity in the premisestoconclusion direction, i.e., if all premises are valid, then so is the conclusion.
2. Each application of any of the rules of CL17 other than (the three versions of) Choosing also preserves logical validity in the conclusiontopremises direction, i.e., if the conclusion is valid, then so are all premises.
Proof. As in [8], we will implicitly rely on the clean environment assumption, allowing us to rule out the possibility that the environment ever makes any illegal moves. We shall also implicitly rely on the straightforward fact that if, for every interpretation , computability of a cirquent under implies computability of a cirquent under the same , then logical validity of implies logical validity of .
If is an application of any of the rules other than Splitting, Chotomy or Choosing, it is not hard to see that, for any interpretation , and are identical as games. So, a logical solution of is automatically a logical solution of , and vice versa. Let us just look at Challcleansing as an example. Consider an application of this rule, where and . Fix some arbitrary interpretation for the present context, and let be an arbitrary legal run. We want to show that is a won run of iff it is a won run of . If is unresolved, then is a won run of the component of the conclusion just as it is a won run of the component of the premise. Then, since and only differ in that one has where the other has , we find that is a won run of both games or neither. Now assume is resolved, i.e., contains the move for some constant . Then is a won run of iff it is a won run of iff it is a won run of . This, again, implies that is a won run of both games or neither.
Chorchoosing is taken care of in the proof of Lemma 6.1 of [8], which shows that this rule preserves computability under any given interpretation. The same can be said about either direction of Chandsplitting.
Consider an application of Chexistschoosing, and assume is a logical solution of the premise. Let be an HPM that, at the beginning of the play, makes the move , after which it plays exactly as would. Obviously is a logical solution of the conclusion.
Of the three Chotomy rules, let us just consider Challchotomy, with the remaining two rules being similar. Consider an application
of Challchotomy. It is not hard to see that, under any interpretation, any won run of the conclusion is also (“even more so”) a won run of the premise, meaning that a solution of the conclusion would automatically also be a solution of the premise. This takes care of the conclusiontopremise direction. For the premisetoconclusion direction, fix an arbitrary interpretation and assume that is a solution of the premise. Let be an HPM that, until it sees that its environment has resolved either or , plays just as would play in the scenario where is not (yet) resolved but otherwise ’s imaginary environment is making the same moves as ’s real environment is making. If and when it sees that a move (resp. ) has been made by its environment, imagines that ’s environment has correspondingly made not only the same move (resp. ) but also (resp. ), and continues playing exactly as would continue playing in that case. With a little thought, can be seen to be a solution of the conclusion.
Finally, consider an application of Challsplitting.
For the conclusiontopremise direction, assume is a logical solution of . Let be the HPM that plays exactly as would play in the scenario where, at the very beginning of the play, the environment makes the move . It is not hard to see that is a logical solution of .
For the premisetoconclusion direction, assume is a logical solution of . Let be an HPM that plays as follows. While continuously polling its run tape, maintains a list of moves, initially empty. This is just to keep track of which moves made by the environment have already been “processed” by . Call the moves that are not in unprocessed. further maintains a partial function . Call the value of the image of , and call the constants at which is not (yet) defined imageless. Initially, the image of each constant occurring in is that constant itself, and all other constants are imageless.
At the beginning of the play, waits till the environment makes the move for some constant . If and when this happens (and if not, wins by doing nothing), adds to , declares to be the image of (the so far imageless) , and starts simulating an imaginary play of by . In this simulation:

Whenever sees an unprocessed move on its run tape where is a cluster, it adds this move to and appends to the content of the imaginary run tape of .

Whenever sees an unprocessed move on its run tape where is a cluster, it adds this move to and appends to the content of the imaginary run tape of , where is an (say, the smallest) imageless constant; after that declares to be the image of .

Whenever sees that the simulated made a move where is a cluster, it makes the same move in its real play.

Whenever sees that the simulated made a move where is a cluster and is imageless, makes the same move in its real play, and declares to be its own image.

Whenever sees that the simulated made a move where is a cluster and is not imageless, makes the move in its real play, where is the image of .
We claim that is a logical solution of . To see this, consider an arbitrary interpretation and an arbitrary “real” play by . Let be the run that has taken place in that play, and be the run that has correspondingly taken place in ’s play as imagined by . Our goal is to show that is a won run of . Let be the residue of , and let be all constants occurring in . Notice that each such constant has acquired an image at some time during the work of (and never lost or changed it afterwards). Let be the result of replacing in each occurrence of each by the image of . Let be an interpretation such that, for any atom of , is true iff so is , where is the result of replacing all constants in by their images.
An analysis of the work of , details of which are left to the reader, reveals that is the residue of , and that is true iff so is . Since is a logical solution of , is a won run of . By Lemma 5.2, this implies that is true. Hence so is , which, again by Lemma 5.2, implies that is a won run of , as desired.
6 Rank and purification
Our proofs in this section closely follow those given in Section 7 of [8]. As in [8], means “tower of ’s of height ” (tetration), defined inductively by and .
Definition 6.1
The rank of a cirquent is the number defined as follows:
1. If is a literal, then its rank is .
2. If is or , then its rank is .
3. If is or , then its rank is .
4. If is , then its rank is , where .^{1}^{1}1In fact, a smaller number can be taken here and below instead of , but why bother.
5. If is , then its rank is , where .
Due to due to the monotonicity of the functions , , and , we have:
Lemma 6.2
The rank function is monotone in the following sense. Consider a cirquent with a subcirquent . Assume is a cirquent with , and is the result of replacing an occurrence of by in . Then .
Definition 6.3
We say that a cirquent is pure iff the following conditions are satisfied:
1. has no surface occurrence of unless itself is .
2. has no surface occurrence of which is in the scope of .
3. has no surface occurrence of or (whatever cluster ) which is in the scope of .
4. has no surface occurrence of the form such that, for some atom , both and are among .
5. has no surface occurrences of unless itself is .
6. If is of the form (), then at least one () is neither  nor rooted.
7. If is of the form , then neither nor contains the cluster .
8. If is of the form , then does not contain the cluster .
Below we describe a procedure which takes a cirquent and applies to it a series of modifications. Each modification changes the value of so that the old value of follows from the new value by one of the rules of CL17 other than Choosing and Splitting. The procedure is divided into eight stages, and the purpose of each stage is to make satisfy the corresponding condition of Definition 6.3.
Procedure Purification applied to a cirquent : Starting from Stage 1, each of the following eight stages is a loop that should be iterated until it no longer modifies (the current value of) ; then the procedure goes to the next stage, unless the current stage was Stage 8, in which case the procedure terminates and returns (the thencurrent value of) .
Stage 1: If has a surface occurrence of the form or , change the latter to using Poridentity perhaps in combination with Porcommutativity. Next, if has a surface occurrence of the form or , change it to using Panddomination perhaps in combination with Pandcommutativity.
Stage 2: If has a surface occurrence of the form or , change it to using Panddistribution perhaps in combination with Porcommutativity.
Stage 3: (a) If has a surface occurrence of the form or , change it to using Chanddistribution perhaps in combination with Porcommutativity. (b) Next, if has a surface occurrence of the form or , change it to using Challdistribution perhaps in combination with Porcommutativity.
Stage 4: If has a surface occurrence of the form and, for some atom , both and are among , change to using Trivialization, perhaps in combination with Pordomination, Porcommutativity and Porassociativity.
Stage 5: If has a surface occurrence of the form or , change it to using Pordomination perhaps in combination with Porcommutativity. Next, if has a surface occurrence of the form or , change it to using Pandidentity perhaps in combination with Pandcommutativity.
Stage 6: In all three cases below, is a cluster not occurring in . (a) If has a surface occurrence of the form , change it to using Chandchotomy. (b) Next, if has a surface occurrence of the form , change it to using Challchotomy. (c) Next, if has a surface occurrence of the form or , change it to using Chandallchotomy perhaps in combination with Pandcommutativity.
Stage 7: If is of the form (resp. ), change it to (resp. ) using Left (resp. Right) chandcleansing.
Stage 8: If is of the form , change it to using Challcleansing.
Lemma 6.4
Each stage of the Purification procedure strictly reduces the rank of .
Proof. Each stage replaces an occurrence of a subcirquent of by some cirquent . In view of Lemma 6.2, in order to show that such a replacement reduces the rank of , it is sufficient to show that . Here we shall only consider Stages 3(b), 6(b,c) and 8, as all other stages or cases are covered in the proof of Lemma 7.4 of [8].
Stage 3(b): With abbreviating , the rank of or is , and the rank of is . The latter is clearly smaller than the former.
Stage 6(b): With abbreviating , the rank of is , and the rank of is . Of course the latter is smaller than the former.
Stage 6(c): With , and standing for the ranks of , and , respectively, the rank of or is , and the rank of is . Obviously the latter is smaller than the former.
Stage 8: Each iteration of this stage replaces a subcirquent by . Since the rank of is obviously the same as the rank of , the rank of is greater than the rank of .
Where is the initial value of in the Purification procedure and is its final value (which exists by Lemma 6.4), we call the purification of .
Lemma 6.5
For any closed cirquent and its purification , we have:
1. If is provable in CL17, then so is .
2. is valid iff so is .
3. is pure.
4. The rank of does not exceed the rank of .
Proof. Clause 1: When obtaining from , each transformation performed during the Purification procedure applies, in the conclusiontopremise direction, one of the inference rules of CL17. Reversing the order of those transformations, we get a derivation of from in CL17. Appending that derivation to a proof of (if one exists) yields a proof of .
Clause 2: Immediate from the two clauses of Lemma 5.3 and the fact that, when obtaining from using the Purification procedure, Choosing is never used.
Clause 3: One by one, Stage 1 eliminates all surface occurrences of in (unless itself is ). So, at the end of the stage, satisfies condition 1 of Definition 6.3. None of the subsequent steps make violate that condition, so , too, satisfies that condition. Similarly, a routine examination of the situation reveals that Stage 2 (resp. 3, …, resp. 8) of the Purification procedure makes satisfy condition 2 (resp. 3, …, resp. 8) of Definition 6.3, and continues to satisfy that condition throughout the rest of the stages. So, is pure.
Case 4: Immediate from Lemma 6.4.
7 The soundness and completeness of Cl17
Theorem 7.1
A closed cirquent is valid if (soundness) and only if (completeness) .
Proof. The soundness part is immediate from clause 1 of Lemma 5.3 and the fact that the axiom is valid. The rest of this section is devoted to a proof of the completeness part. Pick an arbitrary closed cirquent , and let be its purification. We proceed by induction on the rank of .
By clauses 34 of Lemma 6.5, is a pure cirquent whose rank does not exceed that of . We shall implicitly rely on this fact below. In view of ’s being pure, after some analysis it is clear that one of the following conditions should be satisfied:
 Condition 0.

is either or a nonlogical literal.
 Condition 1.

is .
 Condition 2.

is of the form .
 Condition 3.

is of the form .
 Condition 4.

is of the form , and neither nor contains the cluster .
 Condition 5.

is of the form , and does not contain the cluster .
 Condition 6.

is of the form (), where each disjunct is either a nonlogical literal, or rooted, or rooted; besides, for no atom do we have that both and are among .
 Condition 7.

is of the form (), where at least one conjunct is either (0) a nonlogical literal, or (1) rooted, or (2) rooted, or (3) satisfies Condition 6 in the role of .
Assume is valid. We want to show that then is provable. For this, in view clause 1 of Lemma 6.5, it is sufficient to show that is provable. Keep in mind that, by clause 2 of Lemma 6.5, is valid. This immediately rules out Condition 0, because, of course, neither nor nonlogical literals are valid. So, we only need to show that is provable in each of the following seven cases:
Case 1: is as in Condition 1. Then is an axiom and hence provable.
Case 2: is as in Condition 2. Let be a logical solution of . Consider the work of in the scenario where the environment does not move until makes the move for one of . Sooner or later has to make such a move, for otherwise would be lost due to being rooted. Since in the games that we deal with the order of moves is irrelevant, without loss of generality we may assume that the move is made by before any other moves. Let be the result of replacing in all subcirquents of the form by . Observe that, after the move is made, in any scenario that may follow, has to continue and win . This means that is a logical solution of (not only but also) . Thus, is valid. The rank of is of course smaller than that of . Hence, by the induction hypothesis, is provable. Then so is because it follows from by Chorchoosing.
Case 3: is as in Condition 3. This case is rather similar to the preceding one. Let be a logical solution of . Consider the work of in the scenario where the environment does not move until makes the move for some constant . Sooner or later has to make such a move, for otherwise would be lost due to being rooted. As in case 2, we may assume that the move is made before any other moves. Let be the result of replacing in all subcirquents of the form by . After the move is made, in any scenario that may follow, has to continue and win . This means that is a logical solution of . The rank of is smaller than that of . Hence, by the induction hypothesis, is provable. Then so is , as it follows from by Chexistschoosing.
Case 4: is as in Condition 4. By clause 2 of Lemma 5.3, both and are valid, because follows from either one by Chandsplitting. Both and are smaller than . Hence, by the induction hypothesis, both and are provable. Therefore, by Chandsplitting, so is .
Case 5: is as in condition 5. Let be a constant not occurring in . By clause 2 of Lemma 5.3, is valid, because follows from it by Challsplitting. The rank of is smaller than that of . Hence, by the induction hypothesis, is provable. Therefore, by Challsplitting, so is .
Case 6: is as in Condition 6. Not all of the cirquents can be literals, for otherwise would be automatically lost under an interpretation that makes all those literals false, contrary to our assumption that is valid. With this observation in mind, without loss of generality, we may assume that, for some with , the first cirquents are of the form , …, , the next cirquents are of the form , and the remaining cirquents are literals. Let be a logical solution of . Consider the work of in the scenario where the environment does not move until makes either (a) the move for some and , or (b) the move for some and . At some point, should indeed make such a move, for otherwise would be lost under an(y) interpretation which makes all of the literal cirquents false. In case (a), let be the result of replacing in every subcirquent of the form by ; in case (b), let be the result of replacing in every subcirquent of the form by . With some analysis left to the reader, can be seen to be a logical solution of . Thus, is valid. The rank of is smaller than that of and hence, by the induction hypothesis, is provable. But then so is , because it follows from by Choosing.
Case 7: and are is as in Condition 7. The validity of , of course, implies that , as one of its conjuncts, is also valid. This rules out the possibility that is a nonlogical literal, because, as we observed earlier, a nonlogical literal cannot be valid. Therefore we are left with one of the following three possible subcases, corresponding to subconditions (1), (2) and (3) of Condition 7:
Subcase 7.1: is of the form