Counterfactuals as modal conditionals, and their probability

Article history: Received 28 October 2022 Received in revised form 28 June 2023 Accepted 2 July 2023 Available online xxxx


Introduction
Counterfactuals are subjunctive conditional statements about hypothetical situations phrased in the form "if [antecedent] were the case, then [consequent] would be the case" and where the antecedent is usually assumed to be false. The study of counterfactuals and counterfactual reasoning has been carried out in various fields, ranging from logic to philosophy of language and linguistics (see [51] and [32] and the more recent [11] and [46]), as well as social sciences and artificial intelligence. 1 The present paper studies counterfactual statements from a logical and algebraic perspective by introducing a class of modal algebras which we call Lewis algebras. 2 We show that a slightly stronger variant of the logic for counterfactual defined by Lewis in [38] is sound and complete with respect to Lewis algebras. In addition, we present some new ideas and results on the uncertainty of counterfactuals by characterizing the imaging rule for updating an a priori probability defined on these structures.
Our modal algebraic perspective on counterfactual conditionals builds on, and it is inspired by, the algebraic framework of boolean algebras of conditionals recently developed in [19]. In addition to placing counterfactuals in the map of algebraic logic, our approach also enables us to introduce relational, Kripke-style, models which we call Lewis frames. These models naturally arise through the duality between algebras with operators and Kripke frames. Alongside Lewis algebras, the present paper aims to study this alternative semantics and present Lewis frames as an alternative to the typical semantics for counterfactuals provided by Lewis' sphere models.
Lewis algebras, Lewis frames, and their mutual inter-definability are employed in the second part of the paper to show relevant properties for the probability of counterfactuals and to establish a close connection with belief function theory, the mathematical models of Dempster-Shafer theory of evidence, and Gärdenfors' imaging rule for the probabilistic update.
In addition to these technical results, this paper aims to provide logicians working on counterfactuals with a new toolkit to study them using the powerful tools of algebra and algebraic modal logic. Furthermore, it aims to broaden the scope of applications of algebraic logic by bridging the gap between theoretical and applied research.
The best-known approach to counterfactuals originates from the philosophical literature, mainly due to the significant contributions by Lewis [38] and Stalnaker [48]. In the late '60s and early '70s, they initiated a productive and active research area focused on studying logics for counterfactuals in a broad sense. In the formal setting developed by Lewis and Stalnaker, a counterfactual statement of the form "if ψ were the case, then ϕ would have occurred" is usually denoted by ψ lÑ ϕ and, according to their semantics, it is true in a possible world w if ϕ is true in all the closest worlds to w in which ψ is true. The rough intuition behind such interpretation is exemplified by referring to Lewis' own words [38, page 1]: 'If kangaroos had no tails, they would topple over' seems to mean something like this: in any possible state of affairs in which kangaroos have no tails, and which resembles our actual state of affairs as much as kangaroos having no tails permits it to, the kangaroos would topple over. I shall give a general analysis of counterfactual conditionals along these lines.
In artificial intelligence (AI), the interest in counterfactual reasoning has grown in slightly more recent times and from different perspectives. To start with, it is important to emphasize the early work of the symbolic-oriented community of AI, which can be traced back to the papers by Ginsberg [24] and Pearl [44]. In this stream, a special mention is surely due to the paper by Galles and Pearl [22] who formally presented a way to apply counterfactual reasoning to causality. This connection between counterfactuals and causality has been further investigated to explain causation [37,45], develop a logic for causal reasoning [3,7,28,22], and explore (recursive) causal models [29].
Counterfactuals have also drawn the attention of the community of subsymbolic AI. Indeed, counterfactual-like reasoning has inspired improvements in deep learning algorithms [41] and generative adversarial networks [42]. Currently, one of the most intriguing applications of counterfactuals concerns explainable AI (XAI), where they are adopted to increase the confidence in artificial neural networks by human users (see [10,40]).
The present paper aligns with the former stream and aims to put forward a reductionist perspective on counterfactuals. It aims to define counterfactuals by combining a normal necessity operator from modal logic [5] and the probabilistic conditional from recent work on boolean algebras of conditionals [19]. In the standard and other semantic accounts for counterfactuals (such that Fine's [18], Ciardelli's [11], Barbero's [3], Galles and Pearl's [22]) the counterfactual arrow lÑ is taken as a primitive operator in the logical language. Truth conditions for lÑ are hence spelled out in terms of interventions, similarity relations, truthmakers, and so on. In our account, however, the counterfactual operator is reduced to already known and familiar logical operators. This reduction conceptually offers a completely new perspective on counterfactuals from a more technical point of view. Lewis algebras and their dual Lewis frames allow us to re-elaborate the classical truth conditions of counterfactuals in terms of an accessibility relation over permutations of complete state descriptions (i.e. atoms of a boolean algebra of conditionals, see Subsection 2.2 for details), without appealing to any notion of similarity. This fact might suggest new interpretations for counterfactuals as, for instance, Kripke's translation of intuitionistic logic to S4 modal logic [34] shed light on the way intuitionism interprets the logical language.
In the second part of the paper we will address the problem of uncertain quantification of counterfactuals and relate it to the so-called imaging rule (or simply imaging, hereafter) for updating probabilities. The imaging rule is a method introduced by Lewis in [38] and further elaborated by Gärdenfors in [23] and others (see, e.g., [16,26]) for updating an a priori probability distribution on possible worlds when one learns (or imagines) that an event has occurred. Although various methods have been defined for assigning a probability to a counterfactual conditional, we still lack an answer to the question of how to interpret the probability of a counterfactual. Our reductionist account allows us to technically characterize the probability of a counterfactual and offer a new interpretation of it. In Theorem 7.4 we show that the probability of a counterfactual amounts to the value of a certain belief function and can be characterized in terms of Gärdenfors' imaging. It is important to point out again that Lewis algebras are a key tool for obtaining such results. Following the same reductionist philosophy that guided us in the first part of this paper, belief functions can be defined from a probability function and a normal modal operator [15,27,31].
Summary and structure of contributions. To make the rest of this section clear, let us specify that boolean algebras of conditionals are algebras containing formal expressions of the form pa | bq and representing the conditional event "a given b".
Besides these basic expressions, these structures can also deal with compound boolean expressions like pa | bq ^pc | dq or pa | bq that read, respectively, "a given b and c given d" and "it is not the case that a given b is true". The construction of such structures starts with any boolean algebra A of plain (unconditional) events and produces another boolean algebra CpAq that formalizes the conditionals that can be expressed from the events of A. Therefore, for every initial boolean algebra A, a Lewis algebra of A is a pair LpAq " pCpAq, lq where CpAq is as above and l : CpAq Ñ CpAq is a normal necessity operator satisfying further properties that will be specified in Section 3. The fact that Lewis algebras are special boolean algebras with operators allows us to regard them as Kripke frames through the mirror of Jónnson-Tarski duality [5]. By exploiting the dual relation between algebraic and relational models, we will show that every Lewis algebra results in a Lewisian original model for counterfactuals based on spheres, and conversely we will also show that every sphere model determines a Lewis algebra. Consequently, we will show that a (somewhat stronger version of) Lewis' logic for counterfactuals is sound and complete with respect to Lewis algebras and their associated relational frames.
In the second part of the paper, we will address the problem of uncertain quantification of counterfactuals and relate it to the so-called Lewis' imaging rule (or simply imaging, henceforth) for probability updating. This method was introduced by Lewis in [39] and then further elaborated by Gärdenfors in [23] and others (see for instance [16,26]), to update an a priori probability distribution P on possible worlds, upon learning (or imaging) that some event b has occurred. The intuition is that the a priori probability distribution P is updated to a new probability P b by redistributing the masses P pαq, for α being a possible world in which b is false, to those α˚'s that instead satisfy b. The way chosen to redistribute the probability masses from the possible words not satisfying b to those that instead satisfy it determines several specific definitions of imaging. One, for instance, is the usual Bayesian conditioning rule that uniformly distributes the mass of the non-model of b to those of b.
The boolean algebra CpAq that appears in the definition of a Lewis algebra LpAq allows us to define probabilities on the latter in a quite natural way. However, instead of updating P by another probability function P b , we follow a suggestion made by Dubois and Prade in [14] and we will consider that the imaging by an event b, of an a priori P on A, is made in terms of a belief function Bel b defined on A. Then, we show that such an update is faithfully recovered on a Lewis algebra LpAq " pCpAq, lq by combining the so-called canonical extension μ P of P to CpAq (cf. [19,21]) with the modal operator l. The probability μ P pb lÑ aq of the counterfactual b lÑ a can hence be defined as μ P plpa | bqq. As we will prove in Section 7, μ P plpa | bqq coincides with Bel b paq, i.e., the value that the belief imaged by b gives to the plain event a.
The paper is structured as follows: In the next Section 2 we first recall the basis of Lewis logic for counterfactuals and its semantics based on sphere models (Subsection 2.1), while Subsection 2.2 presents boolean algebras of conditionals and their main properties. The main focus of our paper, namely Lewis algebras, is the subject of Section 3. The details about these algebras and their necessary structural properties are respectively given in Subsections 3.1 and 3.2 to enhance readability. The logic of Lewis algebras, denoted as C1`, is introduced in Section 4. Specifically, in Subsection 4.1 we formally define our logic and prove its soundness and completeness with respect to the proper subclass of sphere models that we refer to as total. Then, in Subsection 4.2, we focus on that semantics and show how to define canonical models. The relationship between Lewis algebras, their associated Kripke frames, and total sphere models is the topic that we develop in Section 5. There, in Subsections 5.1, 5.2 and 5.3, we respectively show how to define Lewis algebras from sphere models, sphere models from Lewis algebras, and we prove a completeness theorem for C1`with respect to Lewis algebras. The second part of the present paper, in which we study ways for the uncertain quantification of counterfactuals and the imaging rule based on our algebraic setting opens with Section 6 where we briefly recall how belief functions can be defined by combining probability measures and a normal necessity operator l. In Section 7, we then apply these ideas to define probability functions on Lewis algebras. In the same Section 7, we prove the main result (of the second part) showing that the probability of a counterfactual is the belief imaged by its antecedent and, in turn, it also coincides with the canonical extension, on Lewis algebras, of our modal representation of the counterfactual itself. We then end the paper with Section 8 where we recap our main contributions and also present remarks and ideas for improvements and we outline our future work.
To facilitate the reading of the paper, some technical proofs have been relegated to an appendix.

Preliminaries
For this initial section on preliminary notions, we assume that the reader is familiar with both Lewis' work on logics for counterfactuals and their semantics, universal algebra, and basics of finite boolean algebras. We invite the interest reader to consult [38] and [8] for more details.

Lewis logic for counterfactuals
Let L be the language of classical logic on finitely many variables p 1 , . . . , p k and in the usual signature ^, _, Ñ, K, J.
Formulas of classical logic will be denoted by lower-case Greek letters with possible subscripts ϕ, ϕ 1 , ψ, ψ 1 , etc. Furthermore, let lÑ be a new symbol for a binary connective that applies to pairs of classical formulas, so that, if ϕ, ψ are formulas, then ψ lÑ ϕ is a formula as well.
The connective lÑ is what Lewis ([38]) calls the counterfactual conditional connective that allows reading a formula ψ lÑ ϕ as "if it were the case that ψ , then it would be the case that ϕ". Notation 1. To improve the readability and clarify the interpretation of Lewis' formulas in the algebraic language that will be presented in Section 3, for any pair of classical formulas ϕ, ψ , we will use the notation pϕ| ψq instead of ψ lÑ ϕ for the counterfactual conditional "ϕ, if it were ψ ".
More precisely, our language, which we refer to as L`, is L Y t| u, where counterfactual formulas are defined in the following inductive way: • every classical formula ϕ is a counterfactual formula; • for every pair of classical formulas ϕ, ψ , for ψ satisfiable, pϕ| ψq is a basic counterfactual formula; • the set CF of counterfactual formulas is the smallest set of formulas including the above ones and being closed under classical connectives ^, _, Ñ, K, J.
CF denotes the set of counterfactual formulas, and we use the upper-case Greek letters , , . . . to denote formulas in CF. Notice that Lewis' original language for counterfactuals allows nested occurrences of the binary operator lÑ that, as already stressed, we denote by | . In the present paper, we adopt the simplified language defined above that essentially does not allow for nested occurrences of | . It is worth recalling that similar approaches to deal with simplified languages where some logical operators do not occur nested are quite common in logic and knowledge representation (see for instance [2,17,25,33] The following are the deduction rules of C1. (T) $ ϕ for each classical tautology ϕ; (DT) ψ 1 , . . . , ψ k $ ϕ for all classical tautology of the from pψ 1^. . .^ψ k q Ñ ϕ; (DC) pψ 1^. . .^ψ n q Ñ ϕ $ ppψ 1| γ q ^. . .^pψ n| γ qq Ñ pϕ| γ q. Lewis ([36,38]) introduced several semantics for the logic C1. In the present paper, we will be mainly concerned with the most popular ones, called Lewis's sphere models.

Definition 2.2.
A sphere model is a triple " pI, S , vq where I is a non-empty set and S is a function S : I Ñ PpPpIqq that assigns, to each i P I , a set S i of subsets of I with the following properties: for all i P I , Moreover, for each propositional variable p, vppq is a subset of I . Given a sphere model " pI, S , vq, the map v is extended to compound formulas as follows: We write i , , if i P vp q. A formula is valid if for all sphere model " pI, S , vq and all i P I , i , .

Theorem 2.3 ([36]
). The logic C1 is sound and complete w.r.t. the class of sphere models. In particular, a formula is a theorem of C1 iff it is valid in every sphere model.
The next example shows that the conditional excluded middle principle is not valid in C1.

Example 2.4 (Conditional Excluded Middle).
It is easy to see that the principle of conditional excluded middle pϕ| ψq _ p ϕ| ψq is not valid in sphere models and hence, by Theorem 2.3 below, it is not a theorem of C1. Consider in fact a sphere model pI, S , vq such that: • I " ti, j, ku; • S i " ttiu, ti, j, kuu, with S 1 " tiu and S 2 " ti, j, ku, S j " t ju, and S k " tku; • for some propositional variables p, q, vppq " t j, ku, vpqq " t ju Notice that i . pq| pq since S 2 X vppq Ę vpqq and i . p q| pq since S 2 X vppq Ę vp qq. l

Boolean algebras of conditionals
In this second subsection, we recall basic notions and results from [19] that presents a construction for building a boolean algebra of conditionals, BAC for short, denoted by CpAq, for any boolean algebra A " pA, ^, _, , K, Jq. Intuitively, a BAC over A allows for the presence of basic conditionals, i.e. objects of the form pa | bq for a P A and b P A 1 " AztKu. These basic conditionals can be combined with the usual boolean operations, subject to certain constraints. In particular, a BAC must satisfy the following requirements: (R1) For every b P A 1 , the conditional pb | bq will be the top element of CpAq, while p b | bq will be the bottom; (R2) Given b P A 1 , the set of conditionals A | b " tpa | bq : a P Au will be the domain of a boolean subalgebra of CpAq, and in particular when b " J, this subalgebra will be isomorphic to A; (R3) In a conditional pa | bq we can replace the consequent a by a ^b, that is, the conditionals pa | bq and pa ^b | bq represent the same element of CpAq; (R4) For all a P A and all b, c P A 1 , if a ď b ď c, then the result of conjunctively combining the conditionals pa | bq and pb | cq must yield the conditional pa | cq.
Notice that R4 encodes a sort of restricted chaining of conditionals and it is inspired by the chain rule of conditional probabilities: P pa | bq ¨P pb | cq " P pa | cq whenever a ď b ď c.
In mathematical terms, the formal construction of the algebra of conditionals CpAq is as follows. First, consider the free boolean algebra For every element t P F reep A | A 1 q, we abbreviate t ñ K˚by "t. Second, take the smallest congruence relation " C on Freep A | A 1 q such that: Note that (C1)-(C5) faithfully account for the requirements R1-R4 where, in particular, (C2) and (C3) account for R2.
Finally, the algebra CpAq is defined as follows.
Definition 2.5. For every boolean algebra A, the boolean algebra of conditionals of A is the quotient structure To distinguish the operations of A from those of CpAq, the following signature is adopted: CpAq " pCpAq, [, \, ", ñ, K C , J C q Since CpAq is a quotient of Freep A | A 1 q, its elements are equivalence classes. However, without danger of confusion, we will henceforth identify classes rts " C with one of its representative elements, in particular, by t itself.
A basic observation is that if A is finite, CpAq is finite as well, and hence atomic. Indeed, if A is a boolean algebra with n atoms, i.e. |atpAq| " n, it is shown in [19,Theorem 4.4] that the atoms of CpAq are in one-to-one correspondence with sequences xα 1 , . . . , α n y of pairwise different atoms of A and of maximal length. Each of these sequences gives rise to an atom ω defined as the following conjunction of n ´1 basic conditionals: It is clear that |atpCpAqq| " n! and hence, although finite, CpAq is considerably larger than the original algebra A. Notation 2. Given the bijective correspondence between atoms of CpAq and strings of pairwise different atoms of A of maximal length recalled above, for every ω P atpCpAqq and every j " 1, . . . , n, we denote by ωr js the atom of A that appears in the jth position in the (unique) string that defines ω by (1).
The next result ( [19,Proposition 4.7]) provides a useful characterization for the atoms of CpAq that are below, in the lattice order of CpAq, of a basic conditional of the form pa | bq. From now on (exactly as in [19]) we will use the same symbol ď to denote both the lattice order induced by the algebra A and the corresponding BAC, CpAq. Proposition 2.6. For every n P N, if A is the boolean algebra with n atoms, for every basic conditional pa | bq P CpAq and ω P atpCpAqq, ω ď pa | bq iff ωr js ď a ^b and for all i ă j, ωris ę b.
The following recaps some properties of BAC that will be used insofar and whose proof can be found in [19,Proposition 3.8].
Proposition 2.7. In every BAC CpAq the following properties hold: for every a P A and b, c P A 1 ,

Lewis algebras and their relational frames
As recalled in the introduction, our methodological approach is mainly algebraic; in this section, we introduce the main characters of the present paper that we call Lewis algebras. They consist of modal expansions of boolean algebras of conditionals. As we will show later on, an (almost immaterial) extension of Lewis logic C1 turns out to be sound and complete with respect to these algebraic models.

Lewis algebras and Lewis frames
Let us hence start by defining and studying some basic properties of the following modal expansions of boolean algebras for conditionals. Definition 3.1. For every boolean algebra A, a Lewis algebra of A is a pair LpAq " pCpAq, lq where CpAq is the boolean algebra of conditionals of A and l is a unary operator on CpAq satisfying the following equations: (L1) lpt ñ t 1 q ď plt ñ lt 1 q for all t, t 1 P CpAq; (L2) lpa | Jq " pa | Jq for all a P A; (L3) lpa | a _ bq \ lpb | a _ bq \ rlpc | a _ bq ñ lppc | aq [ pc | bqqs " 1 for all a, b, c P A with a, b ‰ K.
In the remainder of the paper, we will mainly focus on finite Lewis algebras. However, the construction of LpAq is general and it applies to any initial boolean algebra A. Indeed, given any boolean algebra A, and being CpAq its boolean algebra of conditionals, there is always a unary operator l on CpAq that satisfies (L1), (L2) and (L3), namely, the identity map.
We will henceforth denote by L the class of all Lewis algebras LpAq for A being any finite boolean algebra. In other words L " tLpAq | A is a finite boolean algebrau.
To every finite boolean algebra A there correspond possibly several, non-isomorphic, Lewis algebras, each defined by different l operators, satisfying (L1), (L2), and (L3), which can be defined upon the conditional algebra CpAq. It should be noted that, although conditions (L1), (L2), and (L3) are expressed by equations, the class of Lewis algebras is not a variety of algebras, meaning it is not an equational class (cf. [8]). This is because boolean algebras of conditionals do not form a variety, as pointed out in [19]. Before studying some basic properties of Lewis algebras, let us briefly comment on the equations that describe the unary operation l.
Remark 3.2. The first equation (L1) is the algebraic version of the usual axiom (K) of modal logic. Also, recall that the top element of CpAq is pJ | Jq and notice that lpJ | Jq " pJ | Jq is simply an instantiation of (L2). Therefore, the latter equation, together with (L1), ensures that the l of any Lewis algebra is normal (cf. [5]). Besides ensuring the normality of l, (L2) has an interesting interpretation. In fact, when interpreting counterfactual statements pa| bq as lpa | bq in Lewis algebras, (L2) can be read as "trivial counterfactuals are trivial conditionals", where the triviality comes from considering the sure event formula J as antecedent. Finally, (L3) is the most intricate condition for l, and it arises from the equally intricate axiom (C) of Lewis logic C1 as in Definition 2.1. However, it is worth noting that, compared to (C), the equation (L3) has a slightly simplified form. As we prove below in this section, this simplification has been made possible by the structural properties inherited from boolean algebras of conditionals. In Lemma 3.8 below and, more accurately in the next Subsection 3.2, we will take advantage of our algebraic realm to provide more insights into the meaning of (L3) and its effect on Lewis algebras.
As recalled in Subsection 2.2 every CpAq is a boolean algebra and hence every Lewis algebra LpAq is a boolean algebra with operators, BAO in brief (as usual in modal logic [5]). A first immediate consequence of this fact is that in every Lewis algebra LpAq we can define the modal operator , dual to l, as customary: for all t P CpAq, t " l t.
Proposition 3.3. The following equations hold in every Lewis algebra LpAq: for every a P A and b, c P A 1 .
Proof. Let us start noticing that equation (L1) implies, as usual, the monotonicity of l: for all t, s P LpAq, if t ď s, then lt ď ls. The same (L1) implies that lpJ C q " J C . 1. By construction pa | aq coincides, in CpAq, with J C . Thus the claim follows from the above Remark 3.2.
where the last equality follows from 3. Thus, lpa | bq ď pa | bq.
5. By Proposition 2.7 (3) and the monotonicity property of l. l Remark 3.4. We saw in Example 2.4 that the Conditional Excluded Middle pa| bq _ p a| bq does not hold in Lewis sphere semantics. Analogously, that principle does not hold in Lewis algebras as well. Indeed, although pa | bq _ p a | bq is valid in all boolean algebras of conditionals (see [19]), the presence of the modal l makes it fail in some Lewis algebras. Indeed, as a counterfactual pa| bq is interpreted in an appropriate Lewis algebra as lpa | bq, it is enough to show that lpa | bq _ lp a | bq fails in some LpAq. Now, since p a | bq " pa | bq is true in every boolean algebra of conditionals, the previous lpa | bq _ lp a | bq becomes lpa | bq _ l pa | bq " lpa | bq _ pa | bq. Thus, to get a counterexample of the Conditional Excluded Middle principle is enough to consider a Lewis algebra LpAq " pCpAq, lq in which for some pa | bq P CpAq, lpa | bq ă J, pa | bq ą K and pa | bq ă lpa | bq. Notice that this requirement is indeed compatible with what we proved in the above Proposition 3.3 (4).
A second immediate consequence of the fact that Lewis algebras are BAOs is that, from the well-known Jónsson-Tarski duality between (finite) BAOs and Kripke frames (see [5] and [35]), to each Lewis algebra LpAq it is uniquely associated a frame pW , Rq in which • W is the set atpCpAqq of atoms of CpAq; • R is the binary relation on atpCpAqq such that, for all ω, ω 1 P atpCpAqq, ωRω 1 iff @t P CpAq if ω ď lt, then ω 1 ď t.
For every Lewis algebra LpAq we will say that the relational frame patpCpAqq, Rq defined as above is a Lewis relational frame (or simply a Lewis frame) which will be denoted by F LpAq .

Definition 3.5.
For every finite boolean algebra A, for every element t P LpAq and for every ω P atpCpAqq, we say that ω models t and we write ω , t according to the next inductive definition: Let us recall from Subsection 2.2 that, for every atom ω of CpAq there exists a unique string xα 1 , . . . , α n y of atoms of A such that, for any basic conditional pa | bq P CpAq, ω ď pa | bq iff for the first index j such that α j ď b, then α j ď a as well.
Therefore, according to Definition 3.5, and adopting the notation of Section 2.2, ω , lpa | bq iff for all ω 1 P atpCpAqq such that ωRω 1 , ω 1 r js ď a ^b and for all i ă j, ω 1 ris ę b.
The following is an immediate consequence of a well-known and general result.

Fact 1. For every finite boolean algebra A and for all t, s P LpAq, the equation t " s holds in
LpAq iff for all ω P atpCpAqq, ω , t iff ω , s. Thus, in particular, the classes of Lewis algebras and Lewis frames share the same tautologies written in the language of Lewis algebras.
We shall see that the binary relation R of every Lewis frame satisfies some additional properties. To show that, some preliminary notions are needed.
Notation 3. For a boolean algebra A and a P A, we indicate with a " tα P atpAq | α ď au the set of atoms of A that are below a. Furthermore, for every Lewis frame F LpAq " patpCpAqq, Rq and for every ω P atpCpAqq, we will write Rrωs to denote tω 1 P atpCpAqq | ωRω 1 u. Definition 3.6. Given a Lewis frame LpAq " patpCpAqq, Rq, the selection function on LpAq, is a map f : A ˆatpCpAqq Ñ PpatpAqq defined as follows: for all a P A, for all ω P atpCpAqq, f pa, ωq " tω 1 ris P atpAq | ωRω 1 and i is the smallest index s.t. ω 1 ris ď au Remark 3.7. Note that, by the above definition of selection function, the semantic clauses for basic conditionals in Definition 3.5 (2) can be reformulated as: The next lemma shows some properties of the selection function defined as in Definition 3.6 and the accessibility relation of a Lewis frame. Lemma 3.8. In every Lewis frame patpCpAqq, Rq, the binary relation R and the selection function f on patpCpAqq, Rq satisfy the following properties: Proof. 1. Assume, by contradiction, that the Lewis frame patpCpAqq, Rq does not satisfy seriality. In particular, let ω P atpCpAqq such that, for all ω 1 P atpCpAqq it is not the case that ωRω 1 . Furthermore, let a P A be such that ωr1s ę a. Therefore, vacuously ω , lpa | Jq, since no ω 1 is accessible from ω. On the other hand, ω . pa | Jq because, by Proposition 2.6 ωr1s ď J, but ωr1s ę a by assumption. Therefore, by Fact 1, one has that the equation lpa | Jq " pa | Jq does not hold in LpAq which leads to a clear contradiction with the very definition of Lewis algebra.
2. By way of contradiction, assume that there exists ω, ω 1 such that ωRω 1 , and ωr1s ‰ ω 1 r1s. Let a P A be such that ωr1s ď a, but ω 1 r1s ę a (for instance, take a " ωr1s). Then, ω , pa | Jq, but ω . lpa | Jq and hence, by the same argument used in the previous point, this is in contradiction with the fact that lpa | Jq " pa | Jq holds in LpAq, for any a P A.
3. Assume by way of contradiction that there are ω P atpCpAqq and a, b It follows from the proof of Lemma 3.8 that, indeed, seriality and centering are consequences of the fact that Lewis algebras satisfy (L2). Also, a partial version of the converse statement holds, as shown by the following. Lemma 3.9. Let A be a finite boolean algebra and R a binary relation on atpCpAqq. If R satisfies seriality and centering, the algebra pCpAq, lq satisfies lpa | Jq " pa | Jq.
Since ω was taken arbitrarily in Rrωs, then for all ω˚P Rrωs, ω˚ď pa | Jq. Hence, ω ď lpa | Jq, and so pa | Jq ď lpa | Jq. Therefore, lpa | Jq " pa | Jq. l The content of the two previous lemmas is hence recapped by the following.
Corollary 3.10. Let A be any finite boolean algebra. Then the boolean algebra with operators pCpAq, lq satisfies lpa | Jq " pa | Jq iff its corresponding frame patpCpAqq, Rq is such that R satisfies seriality and centering.
Lemma 3.8 (3) provides a first description of equation (L3) on Lewis frames. However, for a more comprehensive characterization of (L3) that we anticipated in Remark 3.2 we will need to introduce additional combinatorial tools that will be developed in the next Subsection 3.2 below. Our desired characterization will be proved in Theorem 3.14 below.

A better understanding of the sphericity condition
Let us start fixing a generic frame F " patpCpAqq, Rq based on the set of atoms of a boolean algebra of conditionals. Let ω be an atom of CpAq and, as in Notation 3, let Rrωs be the set tω 1 , . . . , ω k u of elements of atpCpAqq that are accessible via R from ω. For the sake of clarity and recalling that every atom of CpAq is uniquely identified with a string of length |atpAq| " n of atoms of the original algebra A, let us denote by Rrωs the k ˆn matrix whose generic element a i, j is ω i r js P atpAq (see Notation 2). Notice that, if the frame F satisfies seriality and centering, i.e., by Corollary 3.10 its associated algebra pCpAq, lq satisfies (L2), then Rrωs is nonempty and its first column c 1 has for supporting set c 1 " tωr1su. From now on, we will always assume that F satisfies seriality and centering. Before introducing the main definition of this section, let us fix some additional notation: -For every matrix M, M denotes the set of its elements; -If C and D are matrices with the same number of rows, then C¨D denotes the juxtaposition of C and D.
Moreover, for all i " 1, . . . , k and j " 1, . . . , n we will denote by: -r i the ith row of Rrωs and by r i the set of its elements; -c j the jth column of Rrωs, while c j stands for the set of its elements.
For every ω P atpCpAqq, consider the general construction defined by the following steps: Step 1. Take c 1 , the first column of Rrωs and let |c 1 | " m 1 , i.e. assume that the first column of Rrωs contains m 1 elements of atpAq. Then, call C 1 the submatrix of Rrωs whose columns are, in the order, c 1 , . . . , c m 1 .
Step 2. If m 1 " n, necessarily C 1 " Rrωs since they have the same columns. Then, stop the construction. Otherwise consider the first column, in the usual order of t1, . . . , nu, of Rrωs that does not appear in C 1 , i.e., c m 1`1 and let |c m 1`1 | " m 2 .
• If m 1`m2 ě n, then take C 2 to be the submatrix of Rrωs with columns c m`1 , . . . , c n and the construction stops.
Step t. (inductively). If m 1`m2`. . .`m t´1 " n, C 1¨C2¨¨¨Ct´1 " Rrωs. In such a case, stop the construction. Otherwise take the column Since for every ω P atpCpAqq the matrix Rrωs has finitely many columns, the above procedure stops and it outputs a partition C ω " tC 1 , C 2 , . . . , C t u of Rrωs into submatrices of the same.
Definition 3.11. Let F " patpCpAqq, Rq, ω P atpCpAqq and Rrωs be as above. Then we say that Rrωs is sliceable if the partition C ω " tC 1 , . . . , C t u is such that (˚) for all l " 1, . . . , t, calling c l is the first column of C l , we have that for every row r of C l , c l " r.
In such case, we also say that C ω is a slice partition of Rrωs. We say that F is sliceable if, for all ω P atpCpAqq, Rrωs is sliceable.
To clarify the above definition and the introduced construction, let us consider the finite boolean algebra A with atoms tα 1 , . . . , α 6 u and let ω P atpCpAqq be such that ωr1s " α 1 . Let us consider the following two cases: On the left-hand-side, the sliceable matrix Rrωs defined as in the above case 1; on the right-hand-side the matrix R 1 rωs that is not sliceable because, for instance, c 2 " tα 2 , α 5 u, but the first row r of the submatrix C 2 contains α 3 and it does not contain α 5 .
From what we observed in the construction of C 2 , C ω is not a slice partition of R 1 rωs. Fig. 1 is meant to clarify such property, graphically. The next result is a direct consequence of the definition of sliceable matrix of the kind Rrωs and, more precisely, of the construction of C ω described above.
Remark 3.12. Notice that it follows from the property (˚) of Definition 3.11 that C ω " tC 1 , . . . , C t u is a slice partition of Rrωs iff for all l " 1, . . . , t, all rows of C l are permutations of the first column c of C l .
The construction introduced insofar and the notion of sliceability allow us to fully characterize the sphericity property of a frame F " patpCpAqq, Rq-recall Lemma 3.8 (3)-in terms of sliceable matrices. First, we need to show a preliminary technical result that will help in the proof. Lemma 3.13. Let F " patpCpAqq, Rq be a frame and let ω P atpCpAqq such that Rrωs is not sliceable. In particular let l be the first index, in the natural order, for which there exists a row r P C l and c l ‰ r. Then the following properties hold: 2. There exists α i, j P r such that α i, j R c l ; 3. For all α i, j as in (2), there exists α x, y P c l such that y ‰ j and α x, y does not appear in the jth row of Rrωs before α i, j .

Proof.
(1) is trivial by construction of C ω . As for (2), indeed, if c l ‰ r it might be the case that there exists β P c l and β R r. However, if this is the case, then, by cardinality argument and the construction of C l , there it must also be β 1 P r such that β 1 R c l .
Hence, let us prove (3). By way of contradiction, assume that there exists α i, j P r that does not belong to c l and for which, for all β P c l , they appear in the jth row before the ith column. Now, since C l is the first submatrix of Rrωs for which (˚) fails, all these β's cannot appear before c l in the indexing of Rrωs, for otherwise there would exists a C h with h ă l where p˚q fails contradicting the minimality of l. Thus, these β's must necessarily belong to r and before α i, j . This implies that r has length at least |c l | `1 as it contains all the elements of c l plus α i, j that does not belong to c l by assumption. This is in contradiction with the construction of C ω and hence of C l . l Now we can prove the anticipated characterization result.
Proof. See the Appendix. l We can hence conclude this section with the following useful corollary that summarizes the results contained in Theorem 3.14 above and Corollary 3.10.

Corollary 3.15.
A boolean algebras with operators pCpAq, lq is a Lewis algebra iff its associated frame patpCpAqq, Rq is serial, centered, and sliceable.

The logic of Lewis algebras
In this section, we focus on an extension of Lewis logic C1, denoted as C1`, which captures the formulas of L`that are valid in Lewis algebras. Specifically, the logic C1`will be introduced in the next Subsection 4.1 along with its spherebased semantics: total sphere models. Then, in Subsection 4.2 we will demonstrate how to define canonical models from total models and establish the completeness of C1`with respect to these canonical models.

The logic C1`and its sphere models
Let us start by introducing a canonical way to evaluate the formulas of the language CF in a Lewis algebra. In fact, as pointed out in [19] for the case of boolean algebras of conditionals, logical evaluations in this setting differ from evaluations in algebraic logic where variables are mapped in an algebra and compound formulas are evaluated by compositionality.
Here, the notion of evaluation requires a slightly more tricky treatment, as the binary operator | has to be interpreted using a combination of the binary conditional operator | and the unary modal operator l. 1. On classical formulas φ, e is a truth-functional classical valuation to A such that, if φ is satisfiable, then epφq ‰ K 3 ; 2. If φ " pϕ| ψq is a basic counterfactual formula, epϕ| ψq " lpepϕq | epψqq; 3. If φ is a compound formula containing occurrences of | , its truth value is computed by truth-functionality from its components and boolean operations.
We say that a formula φ is valid in a Lewis algebra LpAq (and we write LpAq |ù φ) if epφq " J for every LpAq-evaluation e. Further, φ is a L-tautology if LpAq |ù φ for all LpAq P L.
Notice that in the above definition, with a slight abuse, we identify A with its isomorphic copy A | J in CpAq. This is the reason why e stands for both the evaluation of classical formulas in A (case 1 in the definition above) and the evaluation of purely counterfactual formulas in LpAq (cases 2 and 3).
It is now easy to show that the class L of Lewis algebras does not provide a complete semantics for Lewis original logic C1. To see this, recall that Lewis introduces a particular counterfactual connective that he calls the might-counterfactual (see [38]): epϕ| ψq " ep p ϕ| ψqq " lp epϕq | epψ qq " l pepϕq | epψ qq " pepϕq | epψ qq, pϕ| ψq Ñ pϕ| ψq is a L-tautology. Therefore, Lewis algebras do not provide a complete semantics for C1. We hence need to consider the next axiomatic extension of it.
For the other direction, let us assume, by way of contradiction, that " pI, S , vq is a total sphere model, but for some i P I , i . pϕ| ψq Ñ pϕ| ψq for some ϕ, ψ P L with ψ satisfiable. Then i , ϕ| ψ and i . ϕ| ψ . Since is total, vpψq X Ť S i ‰ H; hence we have that there are S, S 1 P S i such that vpψq X S Ď vpϕq and vpψq X S 1 Ę vpϕq. However, S i is nested, whence either S Ď S 1 or S 1 Ď S, in both cases we reach a contradiction. l

From total to canonical models
Let us start considering the finitely many propositional variables p 1 , p 2 . . . , p n on which our language L is defined. In every total sphere model pI, S , vq, for all pair of variables p k ‰ p t , one necessarily has that vpp k q ‰ vpp t q. Indeed, if vpp k q " vpp t q for some k ‰ t, by definition of v, one would have vpp k^ p t q " vpp k q X pIzvpp t qq " vpp k q X pIzvpp k qq " H and hence, although p k^ p t is clearly satisfiable, vpp k^ p t q X S i " H, in contradiction with Definition 4.3. More precisely, the following holds. Proposition 4.6. Let pI, S , vq be a total model for L . Then, for any pair of satisfiable and not logically equivalent formulas ϕ, ψ of L , vpϕq Ę vpψq and vpψq Ę vpϕq. In other words, for all ϕ, ψ that are satisfiable and not logically equivalent, there exist two distinct i, j P I such that i P vpϕqzvpψq and j P vpψqzvpϕq.
Proof. Assume, by contradiction, that for two satisfiable and not logically equivalent formulas ϕ, ψ of L, vpϕq Ď vpψq. Then, since ϕ and ψ are satisfiable and not logically equivalent, ϕ^ ψ and ψ^ ϕ are satisfiable. However, vpϕ^ ψq " H. Also, vpψq Ď vpϕq implies vpψ^ ϕq " H contradicting the very definition of total model. l As an immediate consequence of the above result, we have the following. Proof. Assume, by contradiction, that |I| ă 2 n . In L there are exactly 2 2 n formulas, up to logical equivalence, and there are exactly 2 n valuations of L to t0, 1u. Then, and since vpKq " H, by a cardinality argument, there would be at least two satisfiable and not logically equivalent formulas ϕ and ψ for which vpϕq " vpψq. Thus, pI, S , vq would not be total for L by Proposition 4.6. Contradiction.
l Now we want to show that every total model for L can be made in a canonical model for L , i.e. a sphere model on the set L of classical valuations from L to t0, 1u that is also total for L . To do so, let us start from a total model pI, S , vq for L . Define the relation " on I as follows: for all i, j P I , Let us point out the following: given a language L on n variables p 1 , . . . , p n , let us denote by M the set of minterms of L , that is to say, formulas of the form n ľ i"1 pi where, for all i, pi is either p i or p i . Thus, |M| " 2 n . Moreover, if pI, S , vq is total, for all minterms m i , m j P M, if m i ‰ m j , then vpm i q X vpm j q " H. For otherwise, one would have vpm i^m j q " vpKq ‰ H. Moreover, Ť 2 n i"1 vpm i q " I . In other words tvpm i q | m i P Mu is the finest partition of I . (2) is an equivalence on I and we will henceforth denote by I " the quotient set I{ " . Proposition 4.8. If pI, S , vq is a total sphere model for L and " the equivalence relation in (2), then for all i, j P I, i " j iff there exists a (unique) mintem m P M such that i, j P vpmq.

The relation introduced in
Proof. (ñ). Assume that i " j. Then, by definition, for all formula ϕ, i P vpϕq iff j P vpϕq. Assuming, by contradiction, that for all minterm m, either i or j does not belong to vpmq. Since tvpmq | m P Mu is a partition of I , we immediately have a contradiction.
(ð). Assume that i ı j. Therefore, there exists a formula ϕ such that either (1) i P vpϕq and j R vpϕq, or (2) i R vpϕq and j P vpϕq. Further, assume without loss of generality that ϕ is satisfiable. All satisfiable formulas of L are uniquely displayable as a join of minterms, that is to say, for all satisfiable formula ϕ, there are minterms m ϕ 1 , . . . , m ϕ kϕ such that Therefore, if (1) is the case, and since the vpmq's are pairwise disjoint, there is a 1 ď h ď k ϕ such that (1) happens for vpm ϕ h q. Thus j R vpm ϕ h q. If (2) is the case, reasoning as above, we see that i R vpm ϕ h q. l Corollary 4.9. Let pI, S , vq be a total model for L . Then, |I " | " 2 n . More precisely, the map that associates to each ris P I " the minterm m such that vpmq " t j P I | j P risu is a bijection between I " and M.
l Fig. 2. The sphere systems S i1 (on the left) and S ri1s (on the right). In the picture on the left, dashed circles represent the equivalence classes of " on I .
Since minterms from L are in bijection with the set L of classical valuation of L to t0, 1u and, in turn, to the set of atoms of the n-generated free algebra L, the latter are in bijection with I " . Moreover, we can now define a valuation map v " : L Ñ PpI " q as follows: for every classical formula ϕ, v " pϕq " ϕ , the set of classical models of ϕ. Indeed, for all ϕ, v " pϕq " tris P I " : i P vpϕqu. ( Now that we have defined I " and v " , what is left to show is how sphere systems adapt to equivalence classes of worlds.
To this end, let i P I and let S i be the sphere system centered in i. Let us display as usual S i as tS 1 " tiu, S 2 , . . . , S t u so that S 1 Ă S 2 Ă . . . Ă S t . Then, define S ris " tpS 1 q " " trisu, pS 2 q " " tr j 2 s : j P S 2 u, . . . , pS t q " " tr j t s : j t P S t uu.
Therefore, if " pI, S , vq is a total sphere model for L , we can define " " pI " , S " , v " q, where S " clearly stands for tS ris : ris P I " u. Given (1) and (2) above, to prove that " is a sphere model, it is left to show that for all ris P I " , S ris is nested. This claim is shown in the next result where we will also show that " is total as well.

Proposition 4.10.
For a total sphere model " pI, S , vq, its associated canonical sphere model " " pI " , S " , v " q is a total sphere model.

Proof.
To show that " " pI " , S " , v " q is a sphere model, we must show that each system of spheres is nested. For ris " P I " consider pSq " , pS 1 q " P S ris . Since is a sphere model, we have that either S Ď S 1 or S 1 Ď S. If the former is the case, then, by definition of pSq " and pS 1 q " , we have that pSq " Ď pS 1 q " . Analogously, if the latter is the case, then pS 1 q " Ď pSq " . Now, consider a satisfiable formula ϕ P L and take any ris P I . We know that S ris " tpSq " : S P S i u. By the totality of , we have that Ť S i X vpϕq ‰ H, and so we immediately get that Ť S ris X v " pϕq ‰ H. Hence " is total. l The following example is meant to clary the "effect" of the equivalence relation " on any total sphere model for a language with two propositional variables.
Example 4.11. Let L be the language of classical propositional logic on two variables p and q. Let pI, S , vq be a total sphere model for L with I " ti 1 , . . . , i 6 u and consider vpp ^qq " ti 1 , i 3 u, vp p ^qq " ti 4 , i 5 u, vpp ^ qq " ti 2 u and vp p ^ qq " ti 6 u so that, according with Proposition 4.8, ri 1 s " ri 3 s " ti 1 , i 3 u, ri 2 s " ti 2 u, ri 4 s " ri 5 s " ti 4 , i 5 u and ri 6 s " ti 6 u. Furthermore, let S i 1 " tti 1 u, ti 1 , i 3 , i 4 , i 5 u, ti 1 , i 2 , i 3 , i 4 , i 5 , i 6 u " Iu. Therefore, S ri 1 s " ttri 1 su, tri 1 s, ri 4 su, tri 1 s, ri 2 s, ri 4 s, ri 6 su " I " u. Also notice that the sphere system S i 3 " tti 3 u, ti 1 , i 3 , i 4 , i 5 u, ti 1 , i 2 , i 3 , i 4 , i 5 , i 6 u " Iu is such that S ri 3 s " S ri 1 s . In other words the map that assigns, for every i P I , S i Þ Ñ S ris is not injective in general. Furthermore, the following holds. Theorem 4.12. For a total sphere model " pI, S , vq, consider its associated canonical model " " pI " , S " , v " q. For all formulas P CF, and for all i P I we have: i , iff ris , As a consequence, the logic C1`is complete with respect to canonical models.
Proof. The proof can be easily obtained by induction on the complexity of . We show the (unique interesting) case " pϕ| ψq for exemplification. pñq Assume i , pϕ| ψq, then, by totality, there is a S P S i such that H ‰ vpψq X S Ď vpϕq. Now, by the construction of " , consider S " " tr js | j P Su, v " pψq " trhs | h , ψu, and v " pϕq " trks | k , ϕu. By induction hypothesis, we have that for all k P vpψq, rks , ψ , and so, for all rks P v " pψq X S " , rks , ψ . Analogously, since vpϕq " " tr js | j , ϕu, by induction hypothesis, we have that for all j P vpϕq, r js , ϕ. Now, by assumption H ‰ vpψq X S and so, by construction and what we just proved above, it holds that H ‰ v " pψq X S " ; analogously, since vpψq X S Ď vpϕq, we have that vpψq " X pSq " Ď vpϕq " . Hence, ris , pϕ| ψq.
pðq is similar to the previous one and left to the reader. l

Getting Lewis algebras from sphere models, and back
The intuitive connection between Lewis algebras, sphere models, and Lewis frames that has been briefly presented in the above section is made clear here. In this section, we show how to construct sphere models from of Lewis algebras and vice-versa. We will restrict our attention to a proper subclass of spheres-we will call them universal-that are defined as follows.
Definition 5.1. A sphere model pI, S , vq is universal if it satisfies the following property: In the next Subsection 5.1 we present a way to define universal sphere systems from Lewis algebras. To do so, we first need to go through a finer description of Lewis frames and provide a more informative characterization of the effect that the property of sphericity described in the above Lemma 3.8 (3) has on them. Then, in Subsection 5.2, we go backward and define Lewis algebras from sphere systems. Finally, in Subsection 5.3, we will apply these ideas and constructions, together with the results of the previous Section 4, to prove that the logic C1`is sound and complete with respect to Lewis algebras.

From Lewis algebras to universal sphere models
Now we are in a position of showing how to define sphere models from of Lewis algebras, through Lewis frames. The idea can be roughly outlined as follows: given a Lewis algebra LpAq " pCpAq, lq, consider its dual Lewis frame F LpAq " patpCpAqq, Rq and pick an element ω P atpCpAqq. By Corollary 3.15, Rrωs is nonempty and for all ω 1 P Rrωs, ωr1s " ω 1 r1s P atpAq. Thus, we can convert Rrωs in a sphere system S ωr1s on atpAq, centered in ωr1s thanks to the fact that F LpAq is sliceable (see Definition 3.11). However, to get a Lewis sphere model pI, S , eq, and for the construction to be well-defined, a sphere system S i must be associated with each i P I (and only one!) on which S i is centered. On the other hand, in the dual frame F LpAq there are several atoms of CpAq, say ω 1 , ω 2 , . . . , ω pnq , such that ω 1 r1s " ω 2 r1s " . . . " ω pnq r1s and with possibly different accessible worlds. For this reason, to obtain only one sphere system centered in one atom of A, to each Lewis algebra LpAq, and hence to its Lewis frame F LpAq , we need to adopt a choice function χ that selects, for each α atom of A, an (unique) atom ω of CpAq among those for which ωr1s " α. Formally, χ : atpAq Ñ atpCpAqq, (4) α Þ Ñ ω, such that ωr1s " α.
In detail, let LpAq " pCpAq, lq be a Lewis algebra and let χ : atpAq Ñ atpCpAqq be a choice function as in (4). Define χ LpAq to be the system χ LpAq " patpAq, S q where: 1. atpAq is the set of atoms of the original algebra A; Fig. 3. A graphical representation of the sphere systems S α1 defined by the matrix Rrωs, where ωr1s " α 1 , determined by a Lewis algebra.
2. S " tS α u αPatpAq and, for all α P atpAq, let χ pαq be the (unique) atom of CpAq selected by χ (its first component is α). Then, let Rrχ pαqs be the matrix built from Rrχ pαqs, and let c 1 , . . . , c t be its columns that determine the slice partition tC 1 , . . . , C t u of Rrχ pαqs as ensured by Theorem 3.14. Then, define The construction is exemplified in Fig. 3. Lewis algebra LpAq and every choice function χ : atpAq Ñ atpCpAqq, the system S is a sphere system, i.e., for all α P atpAq, S α is centered in α, nested, and α P S for all S P S α . Furthermore, it satisfies that Ť S α " atpAq, i.e., patpAq, S q is universal.

Proposition 5.2. For every
Proof. The proof is straightforward by the construction of S α . In particular, the fact that S α is centered in α is implied by the centered property of F LpAq and nested by definition. As for the extra property that Ť S α " atpAq, it depends on the fact that each S α is nonempty because F LpAq is serial, plus the characterization of the atoms of CpAq as complete sequences of atoms of A. l To conclude the construction, let e be an LpAq-evaluation as in Definition 4.1. Thus, we define v from the variables of L to PpatpAqq in the usual way: for every variable p, vppq " tα P atpAq : α ď eppqu. Notice that, since PpatpAqq is isomorphic to A, we can directly define vppq " eppq without danger of confusion and any loss of generality. Also, notice that v extends in a straightforward way to compound classical formulas. Moreover, if ψ is a satisfiable formula, for all α P atpAq,

Ť
S α X vpψq ‰ H because of condition (1) of Definition 4.1 and the fact that patpAq, S q is universal. Therefore, χ LpAq " patpAq, S , vq is universal and total for L . Moreover the following holds.

From total sphere models to Lewis algebras
We now show how to reverse the construction defined above and hence exhibit how to define Lewis algebras starting from total sphere models.
Let us hence fix a sphere model " pI, S , vq that is total for L and let " " pI " , S " , v " q be the canonical sphere model built from as in Subsection 4.2. Recall that " is universal and that I " can (and will be) identified with the set L of all classical evaluations of L to t0, 1u. Thus, if L has n propositional variables, |I " | " | L | " 2 n . With no surprises, we fix A " PpI " q, the powerset of I . Thus, up to isomorphism, A is the Lindenbaum-Tarski algebra of classical logic for L and atpLq " tα 1 , . . . , α 2 n u. We will henceforth identify I " with atpLq. For every α P atpLq, we consider the set of all maximal paths from α, the center of S α , along the spheres of S α , defined as follows: first of all, let us display S α as usual as a collection of subsets of atpLq, i.e., S α " tS 1 , S 2 , . . . , S t u, with S 1 " tαu. Then, a maximal path (a path henceforth) through S α is a list π " xα, s 2,1 , . . . , s 2,|S 2 ztiu| , . . . , s t,1 , . . . s t,|S t z Ť jăt S j | y, for s 2,1 , . . . , s 2,|S 2 ztiu| P S 2 ztiu, and . . .
Since " is universal, each path has length |atpLq|. For every α P atpLq, let PathpS α q be the (finite) collection of all the paths that can be defined through S α . Notice that, for each π P PathpS α q, πr1s " α.
In other words, each path contains, with no repetition, all the elements of atpLq, whence tPathpS α q : α P atpLqu is a subset of atoms of CpLq.
Finally, let us define R Ď atpCpLqq ˆatpCpLqq by the following stipulation: for all ω P atpCpLqq, In other words, all atoms of CpLq whose first component is α access through R to all the atoms that are paths through S α .
Thus, we call F the frame patpCpLqq, Rq. Let us prove the following.

Proposition 5.4.
For every total sphere model " pI, S , vq, F " patpCpLqq, Rq is a Lewis frame and hence its associated algebra LpLq " pCpLq, lq is a Lewis algebra.
Proof. By Corollary 3.15, we only need to show that F " patpCpLqq, Rq is serial, centered, and sliceable. The first two properties are indeed easy to show because, for all α P atpLq, there is a nonempty S α P S that is centered in tαu. Thus, let us show that F is sliceable.
For that, recall from (5) that for all ω P atpCpLqq, Rrωs " PathpS ωr1s q so that the matrix Rrωs can be displayed as follows: • The first column c 1 of Rrωs is just xωr1s, ωr1s, . . . , ωr1sy; • Take now the second column c 2 . This is made of all the second elements of each path that belong to PathpS ωr1s q. In other words, the set c 2 of elements appearing in such column is S 2 zS 1 . • Moreover, each row of C 2 is just a permutation of the elements in c 2 . In other words, adopting the notation introduced in the above Subsection 5.1, C 2 " c 2 . • The same argument then applies to the first new column c |S 2 zS 1 |`1 , and hence C |S 2 zS 1 |`1 " c |S 2 zS 1 |`1 until reaching the end of Rrωs.
Thus, tC 1 , C 2 , C |S 2 zS 1 |`1 , . . . , C |S t zS t´1 |`1 u is a slice partition of Rrωs. A similar partition can be determined for all ω P atpCpAqq and hence F is sliceable. l In [38], Lewis showed how to define, for every sphere model pI, S , vq, a system pI, tĺ i u iPI , vq where, for every i P I , ĺ i is a total preorder on I that is induced by the sphere system S i P S . For the reader who is familiar with total preorder models, it is worth noting that a similar construction, leading to Lewis frames and consequently to Lewis algebras from total sphere systems, could have been performed by first considering the total preorder model associated with a total sphere model and then directly defining maximal paths of the form Pathpĺ i q from (an appropriate quotient of) each total preorder pI, ĺ i q.
To exemplify the presented construction, we apply it to the example introduced in Fig. 3.
As we did also at the end of the previous Subsection 5.1, let us now show how to define a LpLq-evaluation e from the evaluation v of the starting total model . This is indeed quite immediate because, as done in Subsection 5.1, for every propositional variable p, define eppq " v " ppq " rps P L. Again this definition maps variables into L " PpI " q " Pp L q. Moreover, if ψ is any classical satisfiable formula, epψq " v " pψq is not empty because " is total. In the following result, and thanks to the identification I " " atpLq, we bijectively index the atoms of L with the elements ris of I " .
Proposition 5.6. Let " pI, S , vq be a total sphere model for L and let be a formula of L`and LpLq " pCpLq, lq the Lewis algebra determined by . Then i , iff for all ω such that ωr1s " α ris , ω ď ep q.
Proof. See the Appendix. l Let us conclude this subsection by noting some additional properties that will be used in Section 7. Specifically, it is worth remarking that in this subsection, to define a Lewis algebra from a total sphere model, it has been necessary to pass through a canonical model because their set of worlds is identifiable with the set of atoms (i.e., logical valuations) of the Lindenbaum-Tarski algebra on which our construction is based. Therefore, the same construction of a Lewis algebra LpAq can be performed starting from a total sphere model whose set of possible worlds is atpAq itself. The same construction we presented for the case of canonical models and defining Lewis algebras of the form LpLq can be adapted to this scenario. (5) on atpAq is serial, centered, and sliceable. As a consequence, the algebra pCpAq, lq, where l is defined by R is a Lewis algebra.

Proposition 5.7. Let A be a finite boolean algebra and let patpAq, S , vq be a total sphere model. Then, the relation R defined as in
Also notice that for every formula from L`and α P atpAq, one has that α , iff ω ď ep q for every ω P atpCpAqq such that ωr1s " α and where e is the LpAq-evaluation defined mapping the variables of L as eppq " vppq. Thus, the following also easily holds.

Corollary 5.8. Let
A be a finite boolean algebra, let " patpAq, S , vq be a total sphere model for L and let be a formula of L`. Also let LpAq " pCpAq, lq be the Lewis algebra determined by . Then for all α P atpAq, α , iff for all ω such that ωr1s " α, ω ď ep q.

Completeness
Recall from Subsection 4.2 that to every total sphere model we can associate a canonical model " " pI " , S " , v " q. Now, by Proposition 5.4 and the above theorem, " determines a unique Lewis algebra having, for a domain, the boolean algebra of conditionals built from PpI " q, where I " is identifiable with the set L of all classical evaluations of L to t0, 1u. In other words, and up to isomorphism, PpI " q is the Lindenbaum-Tarski algebra L of classical logic for the language L with respect to which and " are total. Moreover, by (3), the evaluation v " actually maps, via such identification, every classical formula ϕ to its equivalence class rϕs P L. This observation justifies the following. Definition 5.9. A Lewis algebra is said to be canonical for L (or simply canonical) if it is in the form pCpLq, lq where L is the Lindenbaum-Tarski algebra of classical logic for L . The canonical evaluation of L`to pCpLq, lq is that one assigning each variable p of L to its equivalence class rps P L and that, in particular, evaluates pϕ| ψq to lprϕs | rψsq.
We have now all the needed results and constructions allowing us to prove soundness and completeness of the logic C1`(defined in the previous Section 4) with respect to Lewis algebras and canonical evaluations. As for completeness, assume that φ is a formula from L`such that C1`& φ. Then, by Theorem 4.5 there exists a sphere model that is total for L that does not satisfy φ and by Theorem 4.12 also " does not satisfy φ. Since " has a universal frame, by Proposition 5.6, its associated algebra LpLq " pCpLq, lq does not satisfy φ. Finally, from what we just remarked above, the Lewis algebra associated with " is canonical, and the evaluation that does not validate φ is canonical as well. This concludes the proof. l

Imaging probabilities as belief functions and probability on modal algebras
In this section, we introduce and review the basic properties of imaging probabilities and belief functions that are required for Section 7. Before getting into the details, let us briefly recap that the imaging rule (hereafter referred to as imaging) is a technique introduced by Lewis in [39] for updating an a priori probability distribution P over possible worlds (in algebraic terms, atoms of a boolean algebra) upon learning that an event b has occurred. Classical Bayesian conditioning is in fact a special form of imaging where the probabilities assigned to the atoms that are not below b are redistributed uniformly among the atoms that are below b.
In the next Subsection 6.1 we review some key properties of imaging and place them in our algebraic framework. We also present an alternative approach to imaging inspired by a remark made by Dubois and Prade in [14, §3.B]. Briefly, their proposal is to consider the updated mass outside the realm of Bayesian probability and treat it as a mass function in the sense of Dempster-Shafer theory of evidence. We will adopt this approach and therefore need to recall how to handle masses and belief functions, which are the mathematical models used in Dempster-Shafer theory of evidence, within a modal algebraic framework. This will be discussed in Subsection 6.2.

A non-Bayesian imaging
We have just recalled that the imaging rule is a method introduced by Lewis to redistribute an a priori probability, upon learning that a certain event has occurred. In this rule, if α is a world that does not satisfy b, its probability is added to that of the unique world (as per Lewis' original formulation) α 1 that satisfies b and is the closest 4 world to α. This idea has been further extended by Gärdenfors to a more general setting where the set of worlds closest to α is not necessarily a singleton [23]. In such cases, if α 1 , . . . , α t are the closest worlds to α that satisfy b, the probability P pαq is shared among these α i 's in proportion to their closeness.
More formally and contextualizing these ideas within the bounds of the framework of the present paper, let A be a (finite) boolean algebra with atoms α 1 , . . . , α n and patpAq, S , vq be a sphere model on atpAq. Also, let P be a probability distribution on atpAq and b P A 1 . Let us assume, without loss of generality that b " Ž t i"1 α i (with t ď n), while b " Ž n j"t`1 α j so that α i ď b for all i " 1, . . . , t and α j ę b for all j " t`1, . . . , n. For every j " t`1, . . . , n let C b pα j q " tα j 1 , . . . , α j k j u be set of the closest atoms to α j that are below b, i.e., for all j, the sphere system S j " ttα j u, S 2 , . . . , S p u is such that Gärdenfors' imaging rule defines, starting from the original distribution P , the updated P b assigning P b pα j q " 0 for each j " t`1, . . . , n, and for all i " 1, . . . , t, P b pα i q " P pα i q if for all j " t`1, . . . , n, α i ‰ α j l , P b pα i q " P pα i q `λ j l P pα j l q if there exists j " t`1, . . . , n such that α i " α j l and where the parameters λ j l are such that ř k j l"1 λ j l " 1.
Besides Gärdenfors' definition, imaging can be approached in a formally different way. To explain this second idea, let us recall the following quote by Dubois and Prade taken from [14, §3.B] and whose notation has been adapted to our current setting.
[...] Instead of sharing P pαq among the atoms α i ď b, a less committed update is to allocate P pαq to b itself (and none of its subsets). In that case, the imaging process produces a basic probability assignment in the sense of Dempster's view of belief functions. But this type of update is not consistent with Bayesian probabilities because the result of imaging is a family of probability distributions, not a unique one.
In other words, one can think of defining P b by reassigning the probability of the atom α to that element of the algebra that is defined as the join of the atoms below b and that are more similar to α, i.e., C b pαq adopting the above notation. Fig. 5 is intended to provide a graphical comparison between these two approaches.  5. A slice of the boolean algebra with 6 atoms: an element b by which we apply the imaging rule, an atom α that is not below b, and the two atoms α 1 and α 2 (circled) that are below b and are the closest atoms to α, according to some sphere model. On the left-hand side, Gändenfors imaging: the probability P pαq is proportionally added to the probabilities of the atoms α 1 and α 2 . On the right-hand side, following Dubois and Prade, the whole mass P pαq is allocated to α 1 _ α 2 .
In the rest of this paper, we will indeed follow this latter approach inspired by Dubois and Prade that, at best of the authors' knowledge, has not been further explored in the literature. Further details will be provided in Section 7, where we apply it to our specific setting.

Probabilities, modalities, and belief functions on finite boolean algebras
We assume that the reader is acquainted with probability functions on boolean algebras and, in the atomic case, with probability distributions on their atoms. This section is intended to introduce and discuss belief and mass functions, the mathematical models of Dempster-Shafer theory of evidence [12,47] and their interplay with probabilities and normal modal operators.
A belief function Bel is said to be normalized if BelpKq " 0.
In the same way probabilities (over finite algebras) can be characterized in terms of distributions on atoms belief functions on boolean algebras are fully described in terms of mass functions as follows. Let A be any finite boolean algebra.
A mass function on A is a map m that assigns to each element a of A, a real number such that mpKq " 0 and ř aP A mpaq " 1.
Given a mass function m on A, the map Belpaq " ÿ bďa mpbq (6) is a belief function and every belief function on A arises in this way. The elements of A that have a strictly positive mass are called focal elements and they are those that contribute to defining Bel as in (6). Besides the axiomatic approach to belief functions we recalled in the above Definition 6.1, there exists a way to introduce these uncertain models that is more appropriate for us and that consists in defining Bel by combining a probability function P and a normal modal operator l. Although this latter approach has been followed by several scholars [27,31] (see also the more recent papers [15,25]), it is less known. It is hence convenient to recall its pillars.
Let pA, lq be a finite boolean algebra with a normal operator l satisfying (D) lx ď x and let patpAq, Rq be its associated dual (serial) Kripke frame. As usual, for all α P atpAq, let us denote by Rrαs " tα 1 P atpAq : αRα 1 u. Notice that for every α P atpAq, Rrαs can be identified with the element Ž Rrαs of A. Also observe that, since R is serial, Rrαs ‰ H (and hence Rrαs ą K once regarded as element of A), for all α.
For every probability P : A Ñ r0, 1s, let us define m P : A Ñ r0, 1s as follows: for all a P A, m P paq " ÿ Rrαs"a P pαq.
Proposition 6.2. Let A be a finite boolean algebra and P a probability function on A. Then the map m P : A Ñ r0, 1s is a normalized mass function. In other words, ř aP A m P paq " 1 and m P pKq " 0.
Moreover, for all a ‰ α 2 _ α 3 and a ‰ α 4 , m P paq " 0. Thus, ÿ aP A m P paq " m P ptα 2 , α 3 uq`mptα 4 uq " Summing up, by Proposition 6.2, every probability on a finite boolean algebra A and every modal operator l on A satisfying (D), determine a mass function m P on A and hence a belief function Bel P : A Ñ r0, 1s defined as usual from m P : for all a P A, Therefore the following immediately holds.
is a belief function on A whose focal elements are all of the form Rrαs for some α P atpAq.
There is another, yet equivalent, way to define a belief function from a probability P and a modal operator l satisfying (D) on A. It consists in defining Bel P : A Ñ r0, 1s as follows: for all a P A, Bel P paq " P plaq.
Indeed, the fact that l is normal and satisfies (D) is enough to prove that Bel P is a normalized belief function. Moreover, the following holds: Proposition 6.5. Let pA, lq be a finite boolean algebra with operators satisfying (D) with associated Kripke frame patpAq, Rq, and let P be a probability on A. Then, Bel P " Bel P .

Imaging, belief and canonical extensions on Lewis algebras
After the above brief degression on belief functions, probabilities, and normal modal operators, we now return to our formal framework to demonstrate how the preceding results allow us to approach the uncertain quantification of counterfactuals and represent the non-Bayesian imaging rule described in Subsection 6.1, using probabilities on Lewis algebras.
Let us first recall the general method of defining probability functions from a probability distribution on a set of models of a logical language (cf. [43] for a general reference and [22] for the special case of the probability of counterfactuals described within causal models). Within our formal setting based on the language L`, we introduce the following definition which explains what the probability of a counterfactual means in our context.

Definition 7.1. Let
" patpAq, S , vq be a sphere model on the set of atoms of a given boolean algebra A and let P be a probability on A. For every counterfactual formula pϕ| ψq of L`, we define its probability as the value βpϕ| ψq " ÿ α,pϕ| ψq P pαq.
Now, let us describe in more detail the non-Bayesian imaging rule that we briefly discussed in the previous Subsection 6.1 and let us fix a finite boolean algebra with atoms tα 1 , . . . , α n u and a positive probability P on A. Also, let " patpAq, S , vq be a total sphere model and let b be an element of A 1 . For the sake of clarity, and as we did in Subsection 6.1, let us display b as the join of the atoms of A below it and assume, without loss of generality, that those are the first t atoms of A so that b " Ž t i"1 α i and b " Ž n j"t`1 α j . For every j " t`1, . . . , n, let C b pα j q be the set of closest atoms, among α 1 , . . . , α t , to α j as determined by a spheres model . Without danger of confusion and for all j " t`1, . . . , n, we denote by the same symbol C b pα j q that element of A being the join of the elements of C b pα j q. Now, define the map m b : A Ñ r0, 1s as follows: for all a P A, P pα j q if a " C b pα j q, j " t`1, . . . ,n, 0 o t h e r w i s e . (11) Notice that m b pα j q " 0 for all j " t`1, . . . , n and the probability of each such α j has been transferred, as a whole, to C b pα j q P A. By construction, it is immediate to see that ř aP A m b paq " 1 and, in particular ř aďb m b paq " 1. Thus, m b is a mass function on A that induces a belief function Bel b on A defined as in (6): for all a P A, Bel b paq " ř cďa m b pcq. For every pair of element a, b P A with b ‰ K, we call Bel b paq the belief of a imaged by b.
Our first result of this final section shows that the probability of a counterfactual pa| bq given as in Definition 7.1 coincides with the just defined belief of a imaged by b. To prove it, let us first define a notion of selection function that is similar to the one given in Definition 3.6, but is contextualized in the setting of sphere models.

Definition 7.2. Let
A be a finite boolean algebra and let patpAq, S , vq be a sphere model on the set of atoms of A. Then we define the selection function f : atpAq ˆA Ñ A as follows: for every β P atpAq and a P A, if S is the first sphere of S β (with respect to the total order of set-inclusion) that contains at least an atom α ď a, then f pβ, aq " ł pS X a q.
In other words, f pβ, aq is that element of A defined as the disjunction of those atoms of A that are model of a and that appear first, in the order of spheres, in the sphere system S β centered in β.
Notice that f is indeed well-defined because every sphere model is universal in the sense of Definition 5.1, whence for all β a first sphere S P S β that contains a model of a, always exists.
The next fact is indeed easy to prove and it immediately follows from the very definitions of the notions involved. 1. For all β P atpAq, β , pa| bq iff f pβ, bq ď a; 2. For every positive probability P on A and for all c P A, m b pcq " ř f pβ,bq"c P pβq, where m b is defined as in (11).
We are now in the position of proving the anticipated result that connects the probability of a counterfactual pa| bq with the belief of a imaged by b.
Theorem 7.3. For every finite boolean algebra A, spheres system patpAq, S , vq, and positive probability P on A, for all a P A and b P A 1 , Proof. By definition, βpa| bq " ř α,pa| bq P pαq. By Fact 2 (1), the latter equals ř f pα,bqďa P pαq that in turn is equal to ř cďa ř f pα,bq"c P pαq. Now, by Fact 2 (2), ř f pα,bq"c P pαq " m a pcq. Thus, we can conclude that Now, let us turn our attention to Lewis algebras and their probability functions. First of all, recall from [19] that every positive probability P on a finite boolean algebra A can be canonically extended to CpAq, the boolean algebra of conditionals of A, by the following stipulation: pick any ω P atpCpAqq and recall that ω is uniquely associated to a complete list of atoms xα 1 , . . . , α n y of A. Indeed, Then, define the canonical extension of P to ω to be μ P pωq " P pα 1 q¨P By [19, Lemma 6.8] the map μ P is a positive probability distribution on atpCpAqq and hence it induces, as usual, a positive probability function on CpAq that we will indicate by the same symbol.

Now, let
" patpAq, S , vq be a total sphere model on the atoms of the original algebra A. By Proposition 5.7, S determines a normal operator l on CpAq such that LpAq " pCpAq, lq is a Lewis algebra. With this machinery at hand, we hence have another way to define the probability of a counterfactual pa| bq, interpreted in LpAq by lpa | bq, as Prpa| bq " μ P plpa | bqq. (12) By Proposition 6.5, the map Bel μ P : t P CpAq Þ Ñ μ P pltq is hence a belief function on CpAq. Moreover, if F LpAq " patpCpAqq, Rq is the Lewis frame associated to LpAq, by Corollary 6.4 above we have that, for all t P CpAq, The next result is the main outcome of this final section, demonstrating that the two uncertain quantifications of counterfactuals, namely the one of Definition 7.1 and the one in (12), are equivalent. This result, as stated in Theorem 7.3, confirms that the probability of a counterfactual pa| bq is equal to the belief of the consequent a imaged by the antecedent b.
Theorem 7.4. For every positive probability P on a finite boolean algebra A and every total sphere model " patpAq, S , vq it holds that, for every a P A and b P A 1 , Bel μ P pa | bq " μ P plpa | bqq " βpa| bq " Bel b paq.
As it is proved in [21,Proposition 3], the map μ C defined as above is a probability distribution on atpCpAqq, i.e.
ř ωPatpCpAqq μ C pωq " 1 and hence it naturally induces a unique finitely additive probability measure, still denoted by μ C , on the algebra CpAq.
The key difference between starting with a positive probability P and a conditional probability C consists in the fact that while the canonical extension μ P is positive as well, the extension μ C might give 0 probability to some atom ω of CpAq.
Thus, this latter might be regarded as a more general way to approach probability functions on CpAq. Notice that the main result presented in this section, namely Theorem 7.4, clearly holds if we define μ C , instead of μ P and, in particular, the function Bel μ C still is a belief function on CpAq. Also, the proof of the previous theorem can be straightforwardly arranged to prove that, if C is a conditional probability of A, and " patpAq, S , vq is a total sphere model, then it holds that, for every a P A and b P A 1 , There, the probability P on A that defines β as in Definition 7.1 and Bel b on A clearly is C p¨ | Jq, i.e., the unconditional probability determined by C and that fixes the sure event J as antecedent.

Final remarks and future work
In this paper we have presented a logical and algebraic approach to counterfactuals aiming to provide new insights into their representation in terms of modal conditionals. In particular, we introduced a class of boolean algebras with operators, named Lewis algebras, consisting of a boolean algebra of conditionals [19] and a normal modal operator l satisfying suitable properties. In this way, we have shown that a counterfactual statement of the form pa| bq can be expressed using the modal conditional formula lpa | bq. On the algebraic side, we obtained two main results: firstly, a general method to associate Lewis' sphere models with Lewis algebras and vice-versa; second, the introduction of a logic for counterfactuals, denoted C1`, whose algebraic models precisely correspond to Lewis algebras. Furthermore, we focused on addressing the problem of uncertain quantification of counterfactual formulas in an appropriate way. In particular, we showed that the probability of a counterfactual pa| bq can be described both by the belief of a imaged by b, and by the canonical extension of lpa | bq.
In addition to the technical results we have discussed, we believe that the methodology used in the present paper, which combines counterfactual reasoning and modal logic, has the potential to foster a deeper connection and cross-fertilisation between these well-established areas of research. In the following subsections we will provide final remarks and discuss possible research directions that we believe may be of particular interest.

Weakenings and extensions
The logic of Lewis algebras, denoted C1`in this paper, extends the Lewis logic C1 by a modal axiom very similar the typical axiom (D) of modal logic, pϕ| ψq Ñ pϕ| ψq. It is worth noting that this axiom holds in Lewis algebras due to certain properties inherited from boolean algebras of conditionals (as seen in the proof of Proposition 3.3 (4)). In other words, (D) holds in any Lewis algebra as a consequence of our approach to counterfactuals as modal conditionals. Still semantically, (D) describes the fact that atoms of BACs (and hence possible worlds in Lewis frames) are complete lists of classical valuations, while its failure would imply that they are only partial lists Beyond C1 and C1`, the literature on conditional and counterfactual reasoning encompasses a wide class of other logical formalisms (see for instance [38, p. 131]). Of particular interest are the logics that Lewis calls C0 and C2, between which C1 lies (called V, VCS and VC, respectively, in the terminology of [38]).
• The logic C0 is the weakest logic in the hierarchy described in [38, p. 131]. Semantically, the sphere models with respect to which C0 is sound and complete are those which, compared with C1 spheres, have more than one element in the inner sphere. It follows by Lemma 3.9 that their algebraic models could be obtained by removing equation (L2) from the definition of Lewis algebras.
• The logic C2, extensively studied by Stalnaker in [48], coincides with Adam's logic for indicative conditionals [1], rather than counterfactuals. On the algebraic level, models of C2 (or, more precisely, of a variant of C2 requiring possible worlds to be permutations of classical valuations) could be obtained from Lewis algebras by strengthening (L2) to require pa | bq " lpa | bq. Consequently, any Lewis algebra LpAq " pCpAq, lq would turn out to be (term-)equivalent to the underlying BAC, CpAq. The logic having boolean algebras of conditionals as algebraic models have been studied in [19] and denoted by LBC, for Logic of Boolean Conditionals. Establishing whether C2 and LBC are equivalent in any sense remains an open problem.
Finally, let us comment on what we discussed in Sections 6 and 7. In particular, Theorem 7.4 shows that the probability of a counterfactual statement of the form pa| bq is captured by the belief function Bel μ P of the conditional object pa | bq. It must be noted that based on a general result established in [19] (namely [19,Theorem 6.13]) within the realm of boolean algebras of conditionals, the canonical extension μ P of a positive probability function P satisfies that μ P pa | bq " P pa^bq P pbq , indicating that the value assigned by μ P to the conditional object pa | bq coincides with the conditional probability of "a given b". However, when dealing with counterfactual formulas, demonstrating that Bel μ P pa | bq coincides with (any form of defining, see [14] for an overview) the conditional belief of the event "a given b" remains an open problem and it seems to be far from trivial.

On nested conditionals
At the beginning of our algebraic analysis of counterfactual conditionals, we restricted the language to disallow nesting of the conditional symbol "|". This limitation was justified by the fundamental construction of boolean algebras of conditionals, which, as originally defined in [19], only allows us to represent elementary objects of this nature.
However, the same construction of boolean algebras of conditionals does permit the representation of nested conditionals by applying the construction multiple times to an algebra like CpAq. We will now provide some intuitions on how this generalized construction can be established and discuss a couple of intriguing questions that naturally arise in this context.
Let A be a boolean algebra and let CpAq be its boolean algebra of conditionals as in Definition 2.5. The algebra CpCpAqq is, by construction, the quotient FreepCp Aq | CpAq 1 q{ " C where CpAq | CpAq 1 is the set of expressions pc 1 | c 2 q, where c 1 , c 2 P CpAq and c 2 ‰ K, and " C is the congruence defined as in Subsection 2.2, but instantiated on elements of F reepCp Aq | CpAq 1 q. Now, c 1 and c 2 , as elements of CpAq, are boolean conditionals, i.e., boolean expressions constructed using basic conditionals like px | yq for px, yq P A ˆA 1 . For instance, if c 1 " pa 1 | b 1 q and c 2 " pa 2 | b 2 q, the pair pc 1 , c 2 q represents the nested conditional expression ppa 1 | b 1 q | pa 2 | b 2 qq. Once the construction is completed, there are no inherent reasons to prevent further applications, allowing for an increase in the depth of nesting for the conditional operator.
In the case of Lewis algebras, and hence counterfactual conditionals, a similar intuition reveals that we can repeat the construction of LpAq to handle different depths of nested counterfactuals. This is possible because the construction leading to a conditional algebra CpAq does not require the original structure A to be boolean and it can be defined starting with a boolean algebra with operators, including Lewis algebras. Let us clarify this claim by outlining the necessary steps for this specific construction. Let A be any boolean algebra and let us proceed as follows: 1. First of all, we define a Lewis algebra LpAq " pCpAq, lq built upon A.
2. Now, let pLpAq | LpAq 1 q be the set of formal expressions like pl 1 | l 2 q for l 1 P LpAq and l 2 P LpAq 1 . For instance, if l 1 " lpa 1 | b 1 q and l 2 " lpa 2 | b 2 q, pl 1 | l 2 q " plpa 1 | b 1 q | lpa 2 | b 2 qq belongs to pLpAq | LpAq 1 q. 3. Let FreepLp Aq | LpAq 1 q be the free boolean algebra generated by the above pairs and let " C be as in Subsection 2.2 and instantiated on elements of F reepLp Aq | LpAq 1 q. Thus, CpLpAqq is defined as FreepLp Aq | Lp Aq 1 q{ " C . 4. By construction CpLpAqq is a boolean algebra of conditionals. Thus, one can now consider LpLpAqq to be a Lewis algebra pCpLpAqq, l q where l is a normal necessity operator, in general independent on the above l, on the boolean algebra CpLpAqq and satisfying (L1), (L2) and (L3) of Definition 3.1. As we briefly showed right after the definition of Lewis algebras, such a necessity operator always exists.
The generalized constructions briefly presented above define algebras that are reasonable candidates to serve as models for a logic of conditionals and counterfactuals in a language that permits controlled nesting of these operators. However, the increased complexity of these languages raises several issues that need to be addressed before we can assert that these structures effectively capture nested conditionals and counterfactuals. Among these issues, we believe the following two are of key importance: (Q1) Are the properties forced by the congruence " C enough for nested conditionals, or do we have to require some further equation to be satisfied in this more general case? For instance, an equation that we believe should hold among nested conditionals is the following ppa | bq | J C q " ppa | Jq | pb | Jqq. Does this equality hold in CpCpAqq, or does it have to be required by extending " C ? (Q2) In defining LpLpAqq, we must take care of the interaction of two modal operators: an inner and an outer one. How do these necessity operators interact with each other? What kind of Kripke models arise in this multi-modal context?

Future research directions
Future research should begin with a more in-depth logical investigation of the framework presented above. Our focus has been on providing a semantics, based on Lewis algebras, for a variant of Lewis's logic C1, which he claims to be the correct logic of counterfactuals. However, Lewis introduced a wide range of logics of conditionals (see [38]). Exploring whether the algebraic methodology developed in the present paper can be applied to these other systems is, in our opinion, an interesting line of research that we will aim at investigating in our future work. As we briefly mentioned earlier, by dropping axiom (L2) we could retrieve the logic C0`(i.e. C0+(D)). It is interesting to notice that our approach offers a unique perspective on the logic of conditionals: stronger or weaker logics than C1`can be explored using well-established modal logic techniques. Indeed, stronger or weaker constraints on the normal operator l might induce different logics of conditionals. Therefore, it would be interesting to explore which logic of conditionals emerges from imposing some of the axioms commonly adopted in modal logic. This work would help to clarify the connection between modal logic and counterfactual reasoning.
Another interesting topic is the study of logics weaker than C0. This latter corresponds to the weakest system considered by Lewis and its semantics consists of sphere models satisfying the "nestedness" condition (which corresponds to axiom (L3) in the framework of Lewis algebras) without any additional constraint. By dropping axiom (L3), we can obtain weaker logics than those considered by Lewis. To the best of the authors knowledge, a semantical exploration of these weaker systems has only been very recently initiated by some authors [50], using neighborhood semantics. The framework we introduced in this paper, could be easily applied to deepen this semantical exploration and provide intuitive algebraic models for those logics.
The open problem just discussed in the previous Subsection 8.1 will surely deserve to be further investigated. Part of our future research in the area of uncertain conditional measures will focus on determining if the present approach can be further generalized to other frameworks. Preliminary results in this direction are contained in [20] for the case of possibility and necessity measures. However, extending them to the case of belief functions and plausibility measures, or imprecise probabilities is still an ongoing research stream that seems to be far from having a straightforward solution.
To extend the present algebraic setting to the case of nested conditionals, according to what we just discussed in Subsection 8.2, questions (Q1) and (Q2) will surely need to receive an answer.
Another interesting line of research concerns counterfactuals and nonmonotonic reasoning. Indeed, our formalized counterfactuals exhibit clear nonmonotonic behavior, as in Lewis algebra it might hold that lpa | bq ę lpa | b ^cq. Hence, we are not allowed to strengthen the antecedent of a counterfactual and maintain soundness. This property is not surprising, as it has already been observed for conditionals in [19]. However, the results of Section 7 and in particular Theorem 7.4, suggest that a new perspective on counterfactuals and nonmonotonic reasoning could be approached following [4] where the authors apply belief function theory to deal with several systems of nonmonotonic reasoning. Finally, a more philosophical-oriented future work will be directed towards understanding the intuitive interpretation of the modality l that we used in this paper to represent counterfactuals in combination with the conditional operator "|".
Indeed, although we managed to grasp some intuition behind the axioms of Lewis algebras (recall Remark 3.2), a complete understanding of how to read an expression of the kind lpa | bq is still lacking, yet we believe to be of interest and worth investigating.

Declaration of competing interest
The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Tommaso Flaminio reports financial support, administrative support, and travel were provided by European Commission. Tommaso Flaminio reports financial support was provided by Spain Ministry of Science and Innovation. Stefano Bonzio reports administrative support was provided by Francesco Severi National Institute of Higher Mathematics National Group of Algebra and Geometric Structures and their Applications.

Data availability
No data was used for the research described in the article.