Theoretical Computer Science 247 (2000) 191–212 www.elsevier.com/locate/tcs View metadata, citation and similar papers at core.ac.uk brought to you by CORE Some ÿrst-order probability provided by Elsevier - Publisher Connector

Zoran Ognjanovic a;∗, Miodrag RaÄskovic b a MatematickiÄ institut, Kneza Mihaila 35, 11000 Beograd, Yugoslavia b Prirodno-matematickiÄ fakultet, R. Domanovicaà 12, 34000 Kragujevac, Yugoslavia

Received June 1998 Communicated by M. Nivat

Abstract

We present some ÿrst-order probability logics. The logics allow making statements such as P¿s , with the intended meaning “the probability of truthfulness of is greater than or equal to s”. We describe the corresponding probability models. We give a sound and complete inÿnitary axiomatic system for the most general of our logics, while for some restrictions of this we provide ÿnitary axiomatic systems. We study the decidability of our logics. We discuss some of the related papers. c 2000 Elsevier Science B.V. All rights reserved.

Keywords: First order logic; Probability; Possible worlds;

1. Introduction

In recent years there is a growing interest in uncertainty reasoning. A part of inves- tigation concerns its formal framework – probability logics [1, 2, 5, 6, 9, 13, 15, 17–20]. Probability languages are obtained by adding probability operators of the form (in our

notation) P¿s to classical languages. The probability logics allow making formulas such as P¿s , with the intended meaning “the probability of truthfulness of is greater than or equal to s”. Probability models similar to Kripke models are used to give to the probability formulas so that interpreted formulas are either true or false. Every world from a probability model is equipped with a probability space. The corresponding probability measures are deÿned on sets of of possible worlds. In this paper we present some ÿrst-order probability logics and explore their com-

pleteness issues. The most general of our logics (denoted by LFOP1) is similar to the logic with probabilities on possible worlds [1, 9] which is appropriate for ana- lyzing degrees of belief. It is proved in [1] that no complete ÿnitary axiomatization is possible for that logic, and also that even its monadic fragment is undecidable.

∗ Corresponding author. E-mail: [email protected].

0304-3975/00/$ - see front matter c 2000 Elsevier Science B.V. All rights reserved. PII: S0304-3975(98)00341-7 192 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

We give an inÿnitary axiomatic system for LFOP1 which we prove is sound and complete. In this paper the terms ÿnitary and inÿnitary concern meta language only. Object languages are countable, formulas are ÿnite, while only proofs are allowed to be inÿnite.

We also put some restrictions on LFOP1 and investigate the resulting logics. The re- strictions are of the following kinds: only probability measures with ÿxed ÿnite range are allowed in models, only one probability on sets of possible worlds is allowed in a model, the measures are allowed to be ÿnitely additive, the of mea- surable sets of possible worlds can be precisely described, etc. It is interesting that some of the logics obtained by the mentioned constraints have ÿnitary axiomatization, while some fragments are decidable. The rest of the paper is organized as follows. In Section 2 the most general of our logics is introduced, and its , semantics and axiomatization are given. Deÿni- tions, formulations of statements and proofs from this section will be widely used in the remaining sections. In Section 3 we consider the case when only probabilities with ÿxed ÿnite range are allowed and give the corresponding axiomatization. In Section 4 an example which illustrates the relation between probability and modal logics is pre- sented. In Section 5 we consider the case when only one probability measure on sets of possible worlds is allowed. A further restriction of the ÿrst-order probability logics is given in Section 6 where some propositional probability logics are mentioned. In Section 7 the decidability of the considered logics is discussed and a decidable frag- ment of the probability logics is emphasized. We discuss some related papers in Section 8.

2. The logic LFOP1

In this section we present the logic LFOP1 (L for logic, FO for ÿrst-order, and P for probability). We describe its syntax and some classes of models, give an inÿnitary axiomatization and prove that it is sound and complete with respect to the mentioned classes of models.

2.1. Syntax

The language L of the LFOP1-logic is an extension of the classical ÿrst-order language. It is a which contains for each nonnegative integer k, k-ary k k k k relation symbols P0 ;P1 ;:::; and k-ary symbols F0 ;F1 ;:::; and the logical symbols ∧, and ¬, quantiÿer ∀, a list of unary probability operators P¿s for every rational number s ∈ [0; 1], variables x;y;z;:::; and parentheses. The function symbols of the arity 0 are called constant symbols. Terms and atomic formulas are deÿned as in the ÿrst-order . The set of formulas is the smallest set containing atomic formulas and closed under forma- tion rules: if and ÿ are formulas, then ¬ , P¿s , ∧ ÿ and (∀x) are formulas. Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 193

1 2 0 1 0 For example, the following is a formula: P¿s(∀x)P1 (x) → P3 (y; F0 ) ∧ P¿rP¿tP1 (F1 ). A formula is called classical if it contains no probability operators. In this section ;ÿ; ;::: are used to denote formulas. In a formula of the form (∀x) , is said to be the scope of that quantiÿer. An occurrence of a variable x in a formula is bound if it occurs in a part of which is of the form (∀x)ÿ. Otherwise, the occurrence is called free. A formula is a sentence if no variable is free in .If is a formula and t is a term, then t is said to be free for x in if no free occurrences of x lie in the scope of any quantiÿer (∀y), where y is a variable in t.If is a formula, and x1;:::;xm are variables, (x1;:::;xm) indicates that free variables of form a of {x1;:::;xm}.If (x) is a formula, and t is a term free for x in , then (t=x) denotes the result of substituting in the term t for all free occurrences of x. We will also use the shorter form (t) to denote the same . We abbreviate: ¬(¬ ∧¬ÿ)by( ∨ ÿ), (¬ ∨ ÿ)by( → ÿ), ( ↔ ÿ)by(( → ÿ) ∧

(ÿ → )), ¬(∀x)¬ by (∃x) , ¬P¿s( )byP¡s( ), P¿1−s(¬ )byP6s( ), ¬P6s( )by P¿s( ), and P¿s( ) ∧¬P¿s( )byP=s( ).

2.2. Semantics We use the possible-worlds approach to give semantics to probabilistic formulas. It is similar to the objectual for ÿrst-order modal logics [7]. A H of subsets of a nonempty set V is an if it contains V and is closed under complementation and ÿnite union. A ÿnitely additive probability measure  is a function from an algebra H to the real interval [0; 1] which satisÿes: (V )=1 and (H1 ∪ H2)=(H1)+(H2), for all disjoint sets H1;H2 ∈ H. An algebra H is a -algebra if it is closed under countable union. A function  is a probability mea- sure if it maps a -algebra H to the real interval [0; 1] and satisÿes: (V )=1 and S∞ P∞ ( i=1Hi)= i=1 (Hi), for every disjoint sequence {Hi} of sets in H. An LFOP1-model is a structure M = hW; D; I; Probi where: • W is a nonempty set of objects called worlds, • D associates a nonempty domain D(w) with every world w ∈ W , • I associates an interpretation I(w) with every world w ∈ W such that: k k ◦ I(w)(Fi ) is a function from D(w) to D(w), for all i, and k, k k ◦ I(w)(Pi ) is a relation over D(w) , for all i, and k. • Prob is a probability assignment which assigns to every w ∈ W a probability space, such that Prob(w)=hW (w);H(w);(w)i, where: ◦ W (w) is a nonempty subset of W , ◦ H(w) is an algebra of subsets of W (w) and ◦ (w):H(w) → [0; 1] is a ÿnitely additive probability measure.

Let M = hW; D; I; Probi be an LFOP1-model. A variable valuation v assigns some of the corresponding domain to every world w and every variable x, i.e., v(w)(x) ∈ D(w). If w ∈ W , d ∈ D(w), and v is a valuation, then vw[d=x] is a valuation like v except that vw[d=x](w)(x)=d. 194 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

For a given LFOP1-model M = hW; D; I; Probi, and a valuation v the value of a term t (denoted by I(w)(t)v) is: • if t is a variable x, then I(w)(x)v = v(w)(x), and m • if t = Fi (t1;:::;tm), then m I(w)(t)v = I(w)(Fi )(I(w)(t1)v;:::;I(w)(tm)v). The of a formula in a world w ∈ W for a given LFOP1-model M = hW; D; I; Probi, and a valuation v (denoted by I(w)( )v) is: m m • if = Pi (t1;:::;tm), then I(w)( )v = > if hI(w)(t1)v;:::;I(w)(tm)vi∈I(w)(Pi ), otherwise I(w)( )v = ⊥, • if = ¬ÿ, then I(w)( )v = > if I(w)(ÿ)v = ⊥, otherwise I(w)( )v = ⊥, • if = P¿sÿ, then I(w)( )v = > if (w){u ∈ W (w): I(u)(ÿ)v = >}¿s, otherwise I(w)( )v = ⊥, • if = ÿ ∧ , then I(w)( )v = > if I(w)(ÿ)v = >, and I(w)( )v = >, otherwise I(w)( )v = ⊥, and • if =(∀x)ÿ, then I(w)( ) = > if for every d ∈ D, I(w)(ÿ) = >, otherwise v vw[d=x] I(w)( )v = ⊥. A formula holds in a world w from a given LFOP1-model M = hW; D; I; Probi (de- noted by (M; w) |= ) if for every valuation v, I(w)( )v = >.Ifd ∈ D(w), we will use (M; w) |= (d) to denote that in model M = hW; D; I; Probi, for every valuation v, I(w)( (x)) = >. vw[d=x] A sentence is satisÿable if there is a world w in an LFOP1-model M such that (M; w) |= . A set T of sentences is satisÿable if there is a world w in an LFOP1- model M such that for every ∈ T,(M; w) |= . A sentence is valid if for every

LFOP1-model M, and every world w from M,(M; w) |= . 1 As an example consider the formula P¿sP1(x), and suppose that for an LFOP1-model 1 M = hW; D; I; Probi, w ∈ W ,(M; w) |= P¿sP1(x). By the above deÿnition, this holds i 1 1 for every valuation v, I(w)(P¿sP1(x))v = > i (M; w) |=(∀x)P¿sP1(x). On the other 1 hand, as we will show in Section 4, the satisÿability of the formula P¿sP1(x) does not 1 imply the satisÿability of P¿s(∀x)P1(x). In this paper we focus on the class of models that satisÿes the following require- ments: • all the worlds from a model have the same domain, i.e., for all v; w ∈ W , D(v)=D(w), • for every sentence , and every world w from a model M the set {u ∈ W (w):

I(u)( )v = >} of all worlds from W (w) that satisfy is measurable, and • the terms are rigid, i.e., for every model their meanings are the same in all worlds. We denote the class of all ÿxed-domain measurable models with rigid terms by

• LFOP1; Meas. We also consider two subclasses of LFOP1; Meas: • LFOP1; All and • LFOP1;. A model M belongs to the former class if for every world w, H(w) is the of W (w), i.e., if every subset of W (w)is(w)-measurable. A model M belongs Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 195 to the later class if it is a -additive model, i.e., if for every world w from the model, (w)isa-additive probability measure.

2.3. Axiomatic system

The axiomatic system Ax for LFOP1 contains the following schemata: (1) all the of the classical propositional logic, (2) (∀x)( → ÿ) → ( → (∀x)ÿ), where x is not free in , (3) (∀x) (x) → (t=x), where (t=x) is obtained by substituting all free occurrences of x in (x) by the term t which is free for x in (x),

(4) P¿0 , (5) P6r → P¡s , s¿r, (6) P¡s → P6s , (7) (P¿r ∧ P¿sÿ ∧ P¿1(¬ ∨¬ÿ)) → P¿ min(1;r+s)( ∨ ÿ), (8) (P6r ∧ P¡sÿ) → P¡r+s( ∨ ÿ), r + s61 and rules: (1) From and → ÿ infer ÿ. (2) From infer (∀x) .

(3) From infer P¿1 . (4) From ÿ → P¿s−1=k , for every integer k¿1=s, infer ÿ → P¿s . Let us brie y discuss the above axiomatic system. Axioms 1–3 and inference rules 1 and 2 represent a sound and complete axiomatic system for the ÿrst-order classical logic. Any other equivalent system can be used. Axiom 4 announces that every formula is satisÿed by a set of worlds of the measure at least 0. By substituting ¬ for in the axiom 4, the formula P¿0¬ = P61 is obtained. The formula means that every formula is satisÿed by a set of worlds of the measure at most 1. Axioms 5 and 6 are equivalent to 0 (5 ) P¿r → P¿s , r¿s, 0 (6 ) P¿s → P¿s , respectively. The monotonicity of the measure can be expressed by the formula

P¿r → P¿s , for r¿s. As we will show in 2.3, it is a consequence of axioms 5 and 6. Axioms 7 and 8 correspond to the property of the ÿnite additivity of measures. For example, in axiom 7, if sets of worlds that satisfy and ÿ are disjoint, then the measure of the set of worlds that satisfy ∨ ÿ is the sum of the measures of the former two sets. As it is noted in [5], there is no need to have axioms that correspond to the countable additivity, because it cannot be expressed in our language. However, the axiomatic system Ax is sound and complete with respect to the class

LFOP1; of models. Inference rule 3 can be considered as the rule of necessitation in modal logics. The inÿnitary inference rule 4 corresponds to the Archimedean axiom for real numbers. A formula is a theorem (` ) if there is an at most countable sequence of formulas

0; 1;:::; , such that every i is an axiom or it is derived from the preceding formulas by an inference rule. In this paper we will also use the notion of deducibility. A formula 196 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

is deducible from a set T of sentences (T ` ) if there is an at most countable sequence of formulas 0; 1;:::; , such that every i is an axiom or a formula from the set T, or it is derived from the preceding formulas by an inference rule, with the exception that the inference rule 3 can be applied on the only. A set T of sentences is consistent if there are at least one formula which is not deducible from T, otherwise T is inconsistent. A consistent set T of sentences is said to be maximal consistent if for every sentence , either ∈ T or ¬ ∈ T.

2.4. and completeness Theorem 1 (Soundness theorem). The axiomatic system Ax is sound with respect to

LFOP1; Meas; LFOP1; All and LFOP1; classes of models.

Proof. Let L be any of the above-mentioned classes of models. We give only a sketch of a straightforward but tedious proof. We can show that every instance of an axiom schemata holds in every world of every L-model, while the inference rules preserve the L-. For example, let 0 be an instance of a classical propositional axiom obtained by substituting propositional letters by formulas. Suppose that the formula 0 is not valid, 0 i.e., that for some world w from an L-model M, and a valuation v, I(w)( )v = ⊥.It follows that we can ÿnd a classical propositional valuation  such that ( )=⊥,a . Let M = hW; D; I; Probi be an L-model, and w ∈ W such that (M; w) |=

(∀x) (x). It means that I(w)((∀x) (x))v = > for every valuation v. Among these valua- 0 tions there must be one (denoted v ) which assigns to x the value d = I(w)(t)v. For this valuation I(w)( (x))v0 = >. Since I(w)( (x))v0 = I(w)( (t=x))v, we have I(w)( (t=x))v = > for every valuation. Thus, every instance of axiom 3 is valid. Note that the as- sumptions about ÿxed domains and rigidness of terms are crucial [9]. If it is not the case, and (t=x) is of the form P¿sÿ(t=x), the term t refers to objects in other worlds (di erent from w). It can have a consequence that I(w)( (t=x))v = ⊥. Axioms 4–8 concern the properties of measures from L-models and obviously hold in every model. Inference rules 1 and 2 are validity-preserving for the same reason as in the classical ÿrst-order logic. Consider the inference rule 3 and suppose that a formula is L-valid. It must hold in every world from every L-model. For every L-model M = hW; D; I; Probi, and w ∈ W , the sets {u ∈ W (w): (M; u) |= } and W (w) coincide.

Since (w)(W (w)) = 1, it follows that (M; w) |= P¿1 . The inference rule 4 preserves validity because of the properties of the set of rational numbers.

In the sequel of this section ⊥ will be used to denote ∧¬ , for an arbitrary formula . Also, we will use L to denote an extension of the ÿrst order probability language L obtained by adding a countable set of new constant symbols to L. In order to prove the completeness theorems for our logics, we show that every consistent set of sentences is satisÿable. We begin with some auxiliary statements. Then, we describe how a consistent set T of sentences can be extended to a suitable Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 197 maximal consistent set, and how a canonical model can be constructed out of such maximal consistent sets. Finally, we prove that for every world w from the canonical model, a sentence is satisÿed in w if and only if ∈ w, and as a consequence we obtain that the set T is satisÿable.

Theorem 2 (1) (Deduction theorem). If T is a set of sentences; is a sentence; and T ∪{ }`ÿ; then T ` → ÿ.

(2) Let and ÿ be sentences. Then: ` P¿1( → ÿ) → (P¿s → P¿sÿ). (3) Let be a sentence. Then: ` P¿r → P¿s ; r¿s.

Proof. 1. We use the transÿnite induction on the length of the inference. The classical cases follow as usual. Suppose that ÿ = P¿1 is obtained from T ∪{ } by an application of inference rule 3. Then, ` and ` P¿1 are theorems, and from ` ÿ → ( → ÿ), we obtain T ` → ÿ. Suppose that ÿ = → P¿s is obtained from T ∪{ } by an application of the inference rule 4. Then:

T; ` → P¿s−1=k ; for every integer k¿1=s;

T ` → ( → P¿s−1=k ); for every integer k ¿ 1=s; by the induction hypothesis;

T ` ( ∧ ) → P¿s−1=k ; for every integer k¿1=s;

T ` ( ∧ ) → P¿s; by the inference rule 4; T ` → ÿ:

2. The negation of the formula is equivalent to P¿1(¬ ∨ ÿ) ∧ P61−s¬ ∧ P¡sÿ. Since, by the axiom 8, P61−s¬ ∧ P¡sÿ → P¡1(¬ ∨ ÿ), and P¡1 = ¬P¿1 , we have `¬(P¿1( → ÿ) → (P¿s → P¿sÿ)) → P¿1(¬ ∨ ÿ) ∧¬P¿1(¬ ∨ ÿ). It follows that ` P¿1( → ÿ) →(P¿s → P¿sÿ). 0 0 3. By axioms 5 and 6 , we have ` P¿r → P¿s , for r¿s, and ` P¿s → P¿s .It follows that ` P¿r → P¿s , for r¿s.

In our proof a special kind of maximal consistent sets of sentences called saturated sets [7] is needed. A set T of formulas is saturated if it is maximal consistent and satisÿes: • if ¬(∀x) (x) ∈ T, then for some term t; ¬ (t) ∈ T. A saturated extension of a consistent set T of sentences can be constructed as follows.

Theorem 3. Let T be a consistent set of sentences in the ÿrst-order probability lan- guage L; and C be a countably inÿnite set of new constant symbols (C ∩ L = ∅). Then T can be extended to a saturated set T in the language L = L ∪ C.

Proof. Let 0; 1;:::; be an of all sentences in L. We deÿne a sequence of sets Ti;i=0; 1; 2;::: such that: (1) T0 = T, (2) for every i¿0ifTi ∪{ i} is consistent, then Ti+1 = Ti ∪{ i}, 198 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

(3) for every i¿0ifTi ∪{ i} is not consistent, then Ti+1 = Ti ∪{¬ i}. (4) if the set Ti+1 is obtained by adding a formula of the form ¬(∀x)ÿ(x) to the set Ti, then for some c ∈ C, ¬ÿ(c) is also added to Ti+1, so that Ti+1 is consistent, (5) if the set Ti+1 is obtained by adding a formula of the form ¬(ÿ → P¿s ), then for some positive integer n; ÿ →¬P¿s−1=n , is also added to Ti+1, so that Ti+1 is consistent, and S (6) T = i Ti. The sets obtained by steps 1 and 2 are obviously consistent. Step 3 produces consis- tent sets, too. For if Ti; i `⊥, by the deduction theorem we have Ti `¬ i, and since Ti is consistent, so it is Ti ∪{¬ i}. Suppose that for some i¿0, a formula of the form ¬(∀x)ÿ(x) is consistently added (in step 2 or 3) to the set Ti. If there is a constant sym- bol c ∈ C such that ¬ÿ(c) ∈ Ti, then obviously Ti ∪{¬(∀x)ÿ(x); ¬ÿ(c)} is consistent. Suppose that there is no such c. Since the set T does not contain any constant c ∈ C, and Ti ∪{¬(∀x)ÿ(x)} is obtained by adding only ÿnitely many formulas to the set T, there is at least one constant c ∈ C such that c does not appear in Ti ∪{¬(∀x)ÿ(x)}.If Ti ∪{¬(∀x)ÿ(x); ¬ÿ(c)} is not consistent, then Ti; ¬(∀x)ÿ(x) ` ÿ(c). Since c does not appear in Ti ∪{¬(∀x)ÿ(x)}, we have Ti; ¬(∀x)ÿ(x) ` (∀x)ÿ(x), and Ti ` (∀x)ÿ(x). It follows that the set Ti is not consistent, because, by the hypothesis Ti ∪{(∀x)ÿ(x)} is not consistent, a contradiction. Thus, step 4 produces consistent sets. Consider step 5.

If Ti ∪{ÿ → P¿s } is not consistent, then the set Ti can be consistently extended as it is described above. Suppose that it is not the case. Then:

(1) Ti; ¬(ÿ → P¿s );ÿ→¬P¿s−1=k `⊥, for every k¿1=s, by the hypothesis, (2) Ti; ¬(ÿ → P¿s ) `¬(ÿ →¬P¿s−1=k ) for every k¿1=s, by the deduction theorem, (3) Ti; ¬(ÿ → P¿s ) ` ÿ → P¿s−1=k for every k¿1=s, from (2), by the classical tau- tology ¬( → ) → ( →¬ ),

(4) Ti; ¬(ÿ → P¿s ) ` ÿ → P¿s , from (3), by the inference rule 4, (5) Ti `¬(ÿ → P¿s ) → ÿ → P¿s , from (4), by the deduction theorem, (6) Ti ` ÿ → P¿s . Since Ti ∪{ÿ → P¿s } is not consistent, from Ti ` ÿ → P¿s it follows that Ti is not consistent, a contradiction. Thus, step 5 produces consistent sets. Finally, consider the set T obtained by step 6 of the construction. We can show that it is a deductively closed set which does not contain all formulas, and as a consequence that T is consistent. First note that for every sentence ,ifTi ` , then it must be ∈ T. For if = k , and 6∈ T, then Tmax{i; k}+1 ` and Tmax{i; k}+1 `¬ , a contradiction. Let be a sentence, and T ` . If the deduction of from T is a ÿnite sequence, then there is some i¿0 such that

Ti ` , and ∈ T. Suppose that the sequence ÿ1;ÿ2;:::; of formulas which forms the proof of from T is countably inÿnite. We can show that for every i,ifÿi is obtained by an application of an inference rule, and all the premises of ÿi belong to T, then ÿi ∈ T. Suppose ÿi is obtained by the inference rule 1 (modus ponens) and its premises 1 2 1 2 ÿi and ÿi belong to T. There must be some k such that ÿi ;ÿi ∈ Tk . Since Tk ` ÿi,it must be ÿi ∈ T. The same explanation can be used to show that, if ÿi is obtained by the inference rule 2, then ÿi ∈ T.Ifÿi is obtained by inference rule 3, then ÿi is a theorem and it must be ÿi ∈ T. If it is not, then k = ¬ÿi ∈ Tk+1, and Tk+1 is not consistent. Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 199

Suppose that ÿi = ÿ → P¿s is obtained by inÿnitary inference rule 4, and that the 1 2 premises ÿi = ÿ → P¿s−1=k ; ÿi = ÿ → P¿s−1=(k+1) ;::: belong to T.Ifÿ → P¿s 6∈ T,by step 5 of the construction of T, there is a j¿1=s, such that ÿ →¬P¿s−1=j ∈ T. Let l = max{k; j}. By axioms 5 and 6, ÿ → P¿s−1=l ∈ T, and ÿ →¬P¿s−1=l ∈ T. There is a set Tm which also contains these formulas. It follows that Tm ∪{ÿ} is not consistent, and ÿ 6∈ T. There is some j such that ¬ÿ ∈ Tj;Tj ` ÿ →⊥, Tj ` ÿ → P¿s , and ÿ → P¿s ∈ T, a contradiction. Thus, the set T is deductively closed. It does not contain all formulas. If for some , both and ¬ belong to T, then there is some i60 such that ; ¬ ∈ Ti, a contradiction because every Ti is consistent. Thus, T is consistent. From steps 2 and 3 of the construction, it follows that the set T is maximal. Finally, step 4 of the construction guaranties that T is saturated.

The next theorem summarizes some obvious properties of the saturated sets of sen- tences.

Theorem 4. Let T be a saturated set of sentences. Let ; and ÿ be sentences. Then the following hold: (1) If ∈ T; then ¬ 6∈ T. (2) ∧ ÿ ∈ T i ∈ T and ÿ ∈ T. (3) If T ` ; then ∈ T; i.e.; T is deductively closed. (4) If ∈ T and → ÿ ∈ T; then ÿ ∈ T.

(5) If P¿s ∈ T; and s¿r; then P¿r ∈ T. (6) If r is a rational number and r = sup{s: P¿s ∈ T}; then P¿r ∈ T.

Proof. As an example we prove 6. Let r = sup{s: P¿s ∈ T}. By the inference rule 4, T ` P¿r , and, since T is deductively closed set, P¿r ∈ T. The other cases follow similarly.

Let the tuple M = hW; D; I; Probi, be deÿned as follows: • W is the set of all saturated sets in the extended ÿrst-order probability language L, • D is the set of all variable-free terms in L, • for every w ∈ W; I(w) is an interpretation such that: m m m ◦ for every function Fi ;I(w)(Fi ) is a function from D to D such that for m m all variable-free terms t1;:::;tm in L;Fi : ht1;:::;tmi→Fi (t1;:::;tm), and m m ◦ for every relation symbol Pi ;I(w)(Pi )={ht1;:::;tmi for all variable-free terms m t1;:::;tm ∈ L: Pi (t1;:::;tm) ∈ w}. • For every w ∈ W; Prob(w)=hW (w);H(w);(w)i such that: ◦ W (w)=W , ◦ H(w) is a class of sets [ ]={w ∈ W : ∈ w}, for every sentence , and

◦ for every set A ∈ H(w);(w)(A) = sup{r: P¿r ∈ w}.

Theorem 5. Let M = hW; D; I; Probi be deÿned as above. Then; for every w ∈ W; H(w)={[ ]} is an algebra of subsets of W (w). 200 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

Proof. It is not hard to see that the following hold: • W (w)=[ ∨¬ ] ∈ H(w), for an arbitrary sentence , • if [ ] ∈ H(w), then the complement of [ ] is the set [¬ ], and it belongs to H(w), and

• if [ 1];:::;[ n] ∈ H(w), then the union [ 1] ∪ ··· ∪[ n] ∈ H(w) because [ 1] ∪ ··· ∪ [ n]=[ 1 ∨···∨ n]. Thus, for every w, H(w) is an algebra of subsets of W (w).

The next theorem states that M is an LFOP1; Meas-model.

Theorem 6. Let M = hW; D; I; Probi be deÿned as above. Then; the following hold for all sentences ; and ÿ; and every w ∈ W : (1) If [ ]=[ÿ]; then (w)([ ]) = (w)([ÿ]); (2) (w)([ ])¿0; (3) (w)([ ])=1− (w)([¬ ]); and (4) (w)([ ] ∪ [ÿ]) = (w)([ ])+(w)([ÿ]); for all sentence and ÿ such that [ ] ∩ [ÿ] = ∅.

Proof. 1. It is enough to prove that [ ] ⊂ [ÿ] implies (w)([ ])6(w)([ÿ]). From

[ ] ⊂ [ÿ] it follows that `¬( ∧¬ÿ), and ` P¿1( → ÿ). If P¿s ∈ w, then by Theorem 2.2, P¿sÿ ∈ w, and we conclude that (w)([ ])6(w)([ÿ]). 2. Since P¿0 is an axiom, (w)([ ])¿0. 3. Let r = (w)([ ]) = sup{s: P¿s ∈ w}. Suppose that r = 1. Then, by Theorem 4.6 we have P¿1 = P60¬ = ¬P¿0¬ , and ¬P¿0¬ ∈ w. If for some s¿0;P¿s¬ ∈ w,by 0 the axiom 5 it must be P¿0¬ ∈ w, a contradiction. It follows that (w)([¬ ])=1. 0 Suppose that r¡1. Then, for every rational number r ∈ (r; 1], ¬P¿r0 = P¡r0 , and P¡r0 ∈ w. By axiom 6, P6r0 and P¿1−r0 (¬ ) belong to w. On the other hand, if 00 there is a rational number r ∈ [0;r) such that P¿1−r00 (¬ ) ∈ w, then ¬P¿r00 ∈ w,a contradiction. Hence, sup{s: P¿s(¬ ) ∈ w} =1− sup{s: P¿s ∈ w}. 4. Let [ ] ∩ [ÿ]=∅;(w)([ ]) = r and (w)([ÿ]) = s. Since [ÿ] ⊂ [¬ ], by step 3, we have r +s6r +(1−r) = 1. Suppose that r¿0, and s¿0. By the well-known properties of the supremum, and monotonicity (Theorem 2.3) for every rational number r0 ∈ [0;r), 0 and every rational number s ∈ [0;s), we have P¿r0 ; P¿s0 ÿ ∈ w. It follows by axiom 7 that P¿r0+s0 ( ∨ ÿ) ∈ w. Hence, r + s6 sup{t: P¿t( ∨ ÿ) ∈ w}.Ifr + s = 1, then the assertion trivially holds. Suppose r + s¡1. If r + s¡t0 = sup{t: P¿t( ∨ ÿ) ∈ w}, then 0 for every rational number t ∈ (r + s; t0) we have P¿t0 ( ∨ ÿ) ∈ w. We can choose 00 00 rational numbers r ¿r and s ¿s such that: ¬P¿r00 ; P¡r00 ∈ w, ¬P¿s00 ÿ; P¡s00 (ÿ) ∈ w, 00 00 0 and r + s = t 61. By axiom 6, P6r00 ∈ w. Using axiom 8 we have P¡r00+s00 ( ∨ ÿ); ¬P¿r00+s00 ( ∨ ÿ), and ¬P¿t0 ( ∨ ÿ) ∈ w, a contradiction. Hence, (w)([ ] ∪ [ÿ]) = (w)([ ]) + (w)([ÿ]). Finally suppose that r =0 or s = 0. Then we can reason as above, with the only exception that r0 =0 or s0 =0.

Theorem 7 (Completeness theorem for LFOP1; Meas). Every consistent set T of sen- tences has an LFOP1; Meas-model. Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 201

Proof. Let T be a consistent set of sentences. In the above theorems we show that

M = hW; D; I; Probi is an LFOP1; Meas-model. By the induction on the complexity of formulas we can prove that for every sentence , end every world w ∈ W; (M; w) |= i ∈ w. To begin the induction, let be an atomic formula. Then, by the deÿnition of I(w); (M; w) |= i ∈ w. Let = ¬ÿ. Then (M; w) |= ¬ÿ i (M; w) 6|= ÿ i ÿ 6∈ w i ¬ÿ ∈ w. Let = ÿ ∧ . By Theorem 4.2, (M; w) |= ÿ ∧ i (M; w) |= ÿ and (M; w) |= i ÿ ∈ w and ∈ w i ÿ ∧ ∈ w. Let =(∀x)ÿ.If ∈ w, then, because of the axiom 3, ÿ(t) ∈ w for every t ∈ D. By the induction hypothesis (M; w) |= ÿ(t) for every t ∈ D, and (M; w) |=(∀x)ÿ. On the other hand, let 6∈ w. Since w is saturated, there is some t ∈ D such that (M; w) |= ¬ÿ(t). It follows that (M; w) 6|=(∀x)ÿ. Finally, let = P¿sÿ. If ∈ w; sup{r: P¿r(ÿ) ∈ w} = (w)([ÿ])¿s, and (M; w) |= P¿sÿ. For the other direc- tion, suppose that (M; w) |= P¿sÿ, i.e., that sup{r: P¿r(ÿ) ∈ w}¿s.If(w)([ÿ])¿s, then, by the well-known property of supremum and monotonicity of (w);P¿sÿ ∈ w. If (w)([ÿ]) = s, then by Theorem 4.6, P¿sÿ ∈ w.

In the last part of this section the canonical model M from Theorem 7 will be used as a weak model, i.e., as a tool in proving completeness with respect to LFOP1; All and LFOP1;.

Theorem 8 (Completeness theorem for LFOP1; All). Every consistent set T of sen- tences has an LFOP1; All-model.

Proof. The proof can be obtained by applying the extension theorem for additive measures [3] (‘Let C be an algebra of subsets of a set and (w) a positive bounded charge1 on C. Let F be an algebra on containing C. Then there exists a positive bounded charge (w)onF such that (w) is an extension of (w) from C to F and that the range of (w) is a subset of the closure of the range of (w)onC.’) on the measures (w) from the weak canonical model M. Thus, there are ÿnitely additive measures (w)’s deÿned on the power set of W that are extensions of the measures (w)’s.

Theorem 9 (Completeness theorem for LFOP1;). Every consistent set T of sentences has an LFOP1;-model.

Proof. By the Loeb process and a bounded elementary embedding [15] we can trans- form the weak canonical model M from Theorem 7 into a -additive probability model ∗M such that for every sentence and every world w,(M; w) |= i (∗M; w) |= .

The situation that the axiomatic system Ax is sound and complete with respect to three di erent classes of models is similar to the one from the modal framework where,

1 A ÿnitely additive measure is a charge. 202 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 for example, the system K is characterized by the class of all models, but also by the class of all irre exive models [12]. In other words, LFOP1-formulas cannot express the di erences between the mentioned classes of probability models.

FR(n) 3. The logic LFOP1

In this section we give a ÿnitary sound and complete axiomatization with respect FR(n) to a class of models (denoted LFOP1 ) satisfying that their measures have a ÿnite ÿxed range. Let n be a positive integer, and Range = {0; 1=n;:::;(n − 1)=n; 1}.Ifs ∈ [0; 1), then s+ denotes min{r ∈ Range: s¡r}.Ifs ∈ (0; 1];s− = max{r ∈ Range: s¿r}. The set of formulas and sets of models are deÿned as above, with the only exception that a tuple FR(n) M = hW; D; I; Probi is an LFOP1 -model if • (w):H(w) → Range is a ÿnitely additive probability measure with ÿnite range Range. FR(n) Note that LFOP1 -models are given relatively to n, and that di erent choices FR(n) of n produce di erent logics. Similarly as above we deÿne the classes LFOP1; Meas; FR(n) FR(n) LFOP1; All , and LFOP1; . The axiomatic system AxFR(n) contains all the axioms from system Ax, and the inference rules 1–3, as well as the following new axiom:

(9) P¿s → P¿s+ . Since the only inÿnitary inference rule from Ax (4) is not included in AxFR(n),itis a ÿnitary axiomatic system. The notions of theorems and deducibility are deÿned as above, with the important di erence that sequences of formulas that form deductions are ÿnite. Nevertheless, many statements from the previous section still hold. For example, Theorems 1 and 2 can be proved as it is done above. The next theorem states that the axiom 9 implies that the range of measures is the set Range.

Theorem 10. Let be a sentence. Then:

(1) ` P¡r → P6r− ; (2) ` P¿r ↔ P¿r+ ; (3) ` P6r− ↔ P¡r ; (4) `∨s∈RangeP=s ; (5) `∨s∈RangeP=s ; where ∨ denotes the exclusive disjunction.

Proof. 1. The considered formula is equivalent to axiom 9 because P¿r = ¬P6r = ¬P¿1−r¬ = P¡1−r¬ , and P¿r+ = P¿1−(1−r+) = P61−r+ ¬ = P6(1−r)− ¬ . 2. The formula is obtained from axioms 9, and 50. 3. The formula is obtained from the axiom 5, and Theorem 10.1.

4. From ¬P¿1 = P61 , we have ` (P¿1 ∨¬P¿1 ) ∧¬P¿1 . Thus, ` (P¿1 ∧ ¬P¿1 ) ∨ (¬P¿1 ∧¬P¿1 ). From P¿1 ∧¬P¿1 = P=1 , and ` P¡1 → P61 ,we have ` P=1 ∨ P¡1 . From ` P¡1 ↔ ((P¿1− ∨¬P¿1− ) ∧ P¡1 ); ` (P¿s → P¿s− ) Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 203

↔ (P¡s− → P¡s ), we have ` P¡1 ↔ ((P¿1− ∧¬P¿1− ) ∨ (P¡1− ∧ P¡1 )), and ` P=1 ∨ P=1− ∨ P¡1− . In such a way we obtain ` (∨s∈RangeP=s ) ∨ P¡0 . Since `¬P¡0 , we ÿnally have `∨s∈RangeP=s . 5. From P=r = P¿r ∧¬P¿r , and the axiom 5, we have P=r →¬P=s , for s¿r. 0 Similarly, by the axiom 5 , we have P=r →¬P=s , for s¡r. It follows that ` P=r → ¬P=s , for r 6= s, and `∨s∈RangeP=s .

FR(n) FR(n) FR(n) The completeness proofs for the LFOP1; Meas; LFOP1; All , and LFOP1; are similar to the corresponding proofs from the previous section. In the sequel we sketch this proof and emphasize some modiÿed steps. We begin as in Theorem 3, but do not use step 5. Then, Theorems 4.1–4.5 obvi- ously hold, while Theorem 4.6 needs some explanation. By Theorem 10.5, the supre- mum s of the set {r: P¿r ∈ T} must be in the set Range. Also, for that s, it must be P¿s ∈ T. Thus, Theorem 4.6 holds. A canonical model M = hW; D; I; Probi is in- troduced as above. Note that for every w ∈ W and every sentence ; sup{r: P¿r ∈ w} is the same as max{r: P¿r ∈ w; r ∈ Range}, because the set Range is ÿnite. FR(n) FR(n) FR(n) Theorems 5–9, can be proved for the LFOP1; Meas, LFOP1; All , and LFOP1; simi- larly as it is done above. The next theorem announces a property that does not hold for the systems considered in the previous section.

Theorem 11 (Compactness theorem). Let L be any of the logics considered in this section. Let T be a set of sentences. If every ÿnite subset of T is L-satisÿable; then T is L-satisÿable.

Proof. If T is not L-satisÿable, then it is not AxFR(n)-consistent. It follows that T `⊥. Since the axiomatic system AxFR(n) is ÿnitary one, there must be a ÿnite set T 0 ⊂ T such that T 0 `⊥. It is a contradiction because every ÿnite subset of T is both L-satisÿable and AxFR(n)-consistent.

4. Barcan formula

The relation between probability and modal logics is already investigated. In [4, 9] the propositional case is considered, while in [13] the ÿrst-order case is examined. It is showed that probability and modal logics are closely related, but that modal necessity

(denoted by ) is a stronger notion than probability necessity (probability one, P¿1). In this section we give an, up to our knowledge, new example which assures this conclusion. Let us consider, the well-known Barcan formula of the ÿrst-order :

BF (∀x) (x) → (∀x) (x): 204 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

It is proved that BF holds in the class of all ÿrst-order ÿxed domain modal models, and that it is independent from the other ÿrst-order modal axioms [11]. However, the behavior of the reminiscence of this formula:

BF(s)(∀x)P¿s (x) → P¿s(∀x) (x) is quite di erent.

If s =0; BF(0) is valid, because P¿0(∀x) (x) is an instance of axiom 4. Let us consider the class of ÿxed-domain probability models (rigidness of terms and measurability are not essential here). Suppose that 0¡s¡1, and consider the following

ÿxed-domain model M1: • W = {w1;w2;w3;w4}, • D = {d1;d2}, 1 1 1 1 • (M1;w2) |= P1(d1), (M1;w2) 6|= P1(d2), (M1;w3) |= P1(d1), (M1;w3) |= P1(d2), 1 1 (M1;w4) 6|= P1(d1), (M1;w4) |= P1(d2), • (w1)(w2)=1=n, (w1)(w3)=s − 1=n (w1)(w4)=1=n. 1 1 It is easy to see that (M1;w1) |=(∀x)P¿sP1(x), because (w1)({w: w |= P1(d1)})= 1 (w1)({w2;w3})=s, and (w1)({w: w |= P1(d2)})=(w1)({w3;w4})=s. On the other 1 1 1 hand, (M1;w1) 6|=(∀x)P1(x), (M1;w2) 6|=(∀x)P1(x), and (M1;w4) 6|=(∀x)P1(x), whilst 1 1 (M1;w3) |=(∀x)P1(x). Since (w1)({w3})=s − 1=n,(M1;w1) 6|= P¿s(∀x)P1(x). If FR(n) we consider the case of the LFOP1 -logics and s ∈ Range, then M1 belongs to the class of ÿxed domain probability models with measures with the ÿnite range Range.If s 6∈ Range, then BF(s) is equivalent to BF(s+). Thus, for arbitrary s ∈ (0; 1), BF(s)is FR(n) FR(n) not valid in any of the mentioned subclasses of LFOP1 -models. Since LFOP1 - models are LFOP1-models, the same holds for the mentioned subclasses of LFOP1- models.

Suppose that s = 1 and consider the formula BF(1). Let M2 be the following ÿxed- domain probability model:

• W is countable set {w0;w1;w2;:::}, • D is countable set {d0;d1;d2;:::}, 1 • for every i¿0, (M2;wi) |= P1(dj)i i 6= j, • the algebra H(w0) contains all ÿnite subsets of W and all coÿnite subsets of W (a set is coÿnite if its complement is ÿnite),

• the measure (w0) is ÿnitely additive and satisÿes (w0)(A) = 0 for every ÿnite set A ∈ H(w0), (w0)(A) = 1 for every coÿnite set A ∈ H(w0). 1 1 Obviously, for every wi ∈ W , wi 6|=(∀x)P1(x), and (w0)({w:(M2;w) |=(∀xP1(x)}) 1 = 0. On the other hand, for every d ∈ D, {w:(M2;w) |= P1(d)} is a coÿnite set, 1 1 and (w0)({w:(M2;w) |= P1(d)}) = 1. It follows that (M2;w0) |=(∀x)P¿1P1(x), 1 (M2;w0) 6|= P¿1(∀x)P1(x), and that the formula BF(1) does not hold in w0. Thus, it is not valid with respect to any of the mentioned classes of ÿnitely additive models. It is easy to see that a similar construction (with uncountable sets W and D) can be made if the measures are -additive, and that the formula BF(1) is not valid even in -additive models. Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 205

On the other hand, the formulas that correspond to the modal converse of the Barcan formula (CBF (∀x) (x) → (∀x) (x)):

CBF(s) P¿s(∀x) (x) → (∀x)P¿s (x) are theorems of the axiomatic systems Ax and AxFR(n), as well as CBF is in the modal context [11]:

` (∀x) (x) → (x);

` P¿1((∀x) (x) → (x)) by inference rule 3;

` P¿s(∀x) (x) → P¿s (x) by Theorem 2.2;

` P¿s(∀x) (x) → (∀x)P¿s (x) by inference rule 2:

5. The logic LFOP2

The models of type 2 described in [9] are similar to our LFOP1-models. However, type 2 models satisfy that for all worlds w1, w2 from a model M the corresponding measures (w1) and (w2) coincide. As a consequence, the formula (in our notation)  → P¿1, where no function and relation symbols appear in  except in the scope of a probability operator P¿s, is valid. Informally speaking, it means that formulas expressing probabilities either hold in every world from a model or they are not satis- ÿable in that model. In our opinion, such a situation can be better handled in another way. We will retain the condition that in every model there is only one measure, and restrict the probability formulas such that only formulas without iteration of probability operators are allowed.

5.1. Syntax We use the same ÿrst-order probability language L as above, deÿne terms and ÿrst- order classical formulas as usual, but limit the formation rules for probability formulas. Namely, we do not allow either that there are nested probability operators in formulas or that formulas are boolean combinations of classical formulas and formulas with leading probability operators. Let us denote the set of all classical ÿrst-order formulas by ForC, formulas from ForC by ;ÿ;::: . The set ForP of all probability formulas will be deÿned as follows. If ∈ ForC, then P¿s is a basic probability formula. The set of all probability formulas is the least set ForP containing all basic probability formulas, and closed under formation rules: if A; B ∈ ForP, then ¬A, A ∧ B ∈ ForP.In other words, only boolean combinations of basic probability formulas are allowed. Let formulas from ForP will be denoted by A;B;:::; ForC ∪ ForP by For, and formulas from For by , ,::: For example, ¬P¿s ∧ P¿r( → ÿ) is a syntactically correct formula, while P¿sP¿r and (P¿r ) → ÿ are not. 206 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

5.2. Semantics

An LFOP2-model is a structure M = hW; D; I; H; i where: • W is a nonempty set of objects called worlds, • D is a function which assigns to every w ∈ W a domain D(w), • I is a function which assigns to every w ∈ W a classical interpretation I(w), • H is an algebra of subsets of W , and •  is a ÿnitely additive probability measure, : H → [0; 1].

Worlds from an LFOP2-model can be viewed as classical ÿrst-order models such that every world w possesses its own domain D(w) and interpretation I(w), while the corresponding measure  is deÿned on an algebra of sets of these classical models. In this section we do not require that terms are rigid. The values of terms and classical formulas are deÿned as it is done in Section 2.

Let M be an LFOP2 model and a classical sentence. The set of worlds from M that satisfy is denoted by [ ]M . We will omit the subscript M from [ ]M and write [ ], if M is clear from the context. An LFOP2-model M is measurable if [ ] is measurable for every classical sentence . Similarly as above, we can deÿne the subclasses of

LFOP2: LFOP2; Meas, LFOP2;All, and LFOP2;. Let L be any of these classes of models. The satisÿability relation between models and sentences from For fulÿlls the following conditions for every LFOP2-model M = hW; D; I; H; i: • if ∈ ForC, M |= if (∀w ∈ W )(M; w) |= , • M |= P¿s if ([ ])¿s, • if A ∈ ForP, M |= ¬A if M 6|= A, and • if A; B ∈ ForP, M |= A ∧ B if M |= A and M |= B. A set T of sentences is L-satisÿable if there is an L-model M such that every sentence from T is satisÿed in M. A sentence  is L-valid if it is satisÿed in every L-model. Note that in contrast to the deÿnition from Section 2, the satisÿability relation is not deÿned between worlds and formulas. Also note that the classical formulas do not behave in the usual way. For some classical sentences and ÿ and a model M it can be M |= ∨ÿ, but that neither M |= , nor M |= ÿ. Similarly, it can be simultaneously M 6|= and M 6|= ¬ . Nevertheless, the set of all classical sentences that are valid with respect to the above given semantics and the set of all classical valid sentences coincide, because every world from an arbitrary LFOP2-model is a classical ÿrst-order interpretation.

5.3. Axiomatic system It is interesting that a sound and complete axiomatization with respect to the mention classes of models can be given by the axiomatic system Ax from Section 2. Of course, instances of axiom schemata must obey the syntactical restrictions that hold in this section. Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 207

5.4. Soundness and completeness We follow the general pattern of the corresponding proofs from Section 2. Theorems 1,2.2, and 2.3 can be proved as it is done there. We have to change the formulation of Theorem 2.1 only, because of the formation rules for the considered logics:

Theorem 12 (Deduction theorem). If T is a set of sentence;a sentence; and T∪{}` ; then T `  → ; where  and are either both classical or both probability formulas.

A canonical model M is deÿned as follows: Let T be a consistent set of sen- tences, clconseq(T) the set of all classical sentences that are consequences of T, and

A0;A1;:::; an enumeration of all probability sentences. We deÿne a sequence of sets Ti, i =0; 1; 2;:::; such that: (1) T0 = T ∪ clconseq(T) ∪{P¿1 : ∈ clconseq(T)}, (2) for every i¿0, if Ti ∪{Ai} is consistent, then Ti+1 = Ti ∪{Ai}, otherwise, Ti+1 =Ti ∪{¬Ai}, (3) if Ai = B → P¿s , and Ti ∪{Ai} is not consistent, then Ti+1 = Ti ∪{¬(B → P¿s ); B →¬P }, for some positive integer n, such that T is consistent. S ¿s−1=n i+1 (4) T = i Ti. The set T is used to construct a tuple M = hW; D; I; {[ ]: is a classical sentence}; ; i, where: • W = {w: w |= clconseq(T)} contains all the classical ÿrst-order interpretations that satisfy the set clconseq(T) of all classical consequences of the set T, • D(w) is the domain of the interpretation w, • I(w) is the interpretation w, • for every classical sentence ,[ ] denotes the set {w ∈ W : w |= }, and

• : {[ ]: is a classical sentence}→[0; 1] such that ([ ]) = sup{s: P¿s ∈ T}. The of the sets Ti’s and T, and the counterparts of Theorems 4–6 can be proved similarly as it is done in Section 2. Thus, M is an LFOP2; Meas-model. In the proof of the counterparts of Theorem 7 only one step must be changed. In or- der to show that a consistent set T has an LFOP2; Meas-model, we should prove that for every sentence , M |=  i  ∈ T. It can be done using the induction on the complex- ity of formulas. If is a classical sentence, and ∈ clconseq(T), then by the deÿnition of M, M |= . Conversely, let M |= . By the completeness of the classical ÿrst-order logic (clconseq(T) |= i clconseq(T) ` ), ∈ clconseq(T). The other cases, as well as the counterparts of Theorems 8 and 9, can be proved as it is done in Section 2. Note that in the construction of the canonical model it is not required that for every classical sentence at least one formula from { ; ¬ } must be in T. This request would imply a degenerated model in which every classical sentence has the same truth value in every world, and consequently that either [ ]=1 or [ ]=0. FR(n) Note that it is possible to consider the systems LFOP2 such that only formulas without iteration of probability operators and only the models with the measure with 208 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

FR(n) ÿxed ÿnite range are allowed. A ÿnitary axiomatization for LFOP2 systems is given in [19].

6. Propositional case

We can go further and restrict our logics to be propositional. The corresponding models are obvious restrictions of the ÿrst-order probability models. According to the above described procedure we can consider the following systems:

• LPP1 (L for logic, ÿrst P for propositional, and second P for probability), such that rules for making formulas allows unrestricted iteration of probability operators, and the class of probability models contains models with measures with ranges [0; 1], FR(n) • LPP1 , a restriction of LPP1, such that only models with ÿxed ÿnite range Range are allowed,

• LPP2, such that only formulas without iteration of probability operators are allowed, and FR(n) • LPP2 , a restriction of LPP2, such that only models with ÿxed ÿnite range Range are allowed, and the classes of measurable models, models where every set of pos- sible worlds is measurable, and -additive models.

Inÿnitary axiomatic systems for LPP1 and LPP2 can be obtained from the system Ax by removing the ÿrst-order axioms 2 and 3 and the inference rule 2 from Ax. The completeness proofs are almost identical to the corresponding proofs in the pre- FR(n) FR(n) vious sections. Finitary axiomatic systems for LPP1 , and LPP2 are given in [14, 17, 19, 20].

7. Decidability

The logics from Sections 2 and 3 contain the classical ÿrst-order logic. Thus, they are undecidable. The monadic fragments of the considered systems are undecidable, too. To show that, we can use the procedure due to Kripke [11, 16]. There is a translation of classical ÿrst-order formulas that contain only one binary relation symbol P2 to monadic probability formulas such that a classical ÿrst-order formula is valid if and only if its translation is a valid probability formula. The translation replaces every 2 1 1 expression of the form P (t1;t2) in a classical formula by (P1(t1) ∧ P2(t2)). Since the fragment of the classical ÿrst-order logic with a single binary relation symbol is not decidable, the same holds for the monadic fragments of the ÿrst-order probability logics with iterations of probability operators. Similarly, the logics from Section 5 are undecidable. However, their monadic frag- ments are decidable. It can be proved, using propositional reasoning, that every formula

A ∈ ForP can be equivalently transformed to a formula

Wm Vki  P i; j; (1) DNF(A)= ¿si; j i=1 j=1 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 209 called a disjunctive normal form of A, where P is either P or ¬P , and ¿si; j ¿si; j ¿si; j i; j’s are classical ÿrst-order formulas. The formula A is satisÿable if at least one of disjuncts from DNF(A) is satisÿable. If A is a monadic sentence, so it is every i; j. Let V us consider an arbitrary disjunct Di = ki P i; j and an LFOP (or LFOPFR(n)) j=1 ¿si; j 2 2 model M = hW; D; I; H; i. We can suppose, without loss of generality, that all quanti- ÿers in Di refer to di erent variables. Let m be the number of di erent variables in i V i ki i; j D . In every world holds exactly one conjunction j=1  . It is well known that a classical monadic formula with m variables is satisÿable if and only if it is satisÿable in a model of 2m. For every world w ∈ W we consider a classical ÿrst- order model w0 =(D(w0);I(w0)) such that D(w0) contains 2m elements and I(w0) |= V V ki i; j ki i; j j=1  if and only if w |= j=1  . For the model M we can construct a model M 0 = hW 0;D0;I0;H0;0i whose worlds are the considered classical ÿrst-order models. 0 m 0 Note that the domains of the worlds from M are of the cardinality 2 . A set H1 belongs 0 0 0 to the algebra H if and only if there is a set H1 ∈ H such that w ∈ H1 if and only if 0 0 0 0 0 w ∈ H1. The measure  is deÿned such that for all H1 ∈ H, H1 ∈ H ,  (H1)=(H1). 0 i i It follows that M |= D if and only if M |= D . Let d1;d2;:::;d2m denote the elements 0 m in the domains of worlds from M . Let c1;c2;:::;c2m be a sequence of 2 new constant 0 0 0 symbols. The deÿnition of M is extended so that for every w , I(w )(ci)=di. For every i; j we consider a formula # i; j without quantiÿers which contains variable-free for- mulas only. Namely, we replace every universal quantiÿer by a conjunction, and every existential quantiÿer by a disjunction of variable-free formulas. For example, a formula V m W m 1 1 2 1 2 1 of the form (∀x)P1(x) ∧ (∃y)P2(y) can be replaced by k=1 P1(ck ) ∧ ( k=1 P2(ck )). Since domains of worlds from M 0 are ÿnite, for every w0 ∈ W 0, w0 |= i; j if and only if V w0 |=# i; j. Thus, M |= Di if and only if #Di = ki P # i; j is satisÿable in M 0. j=1 ¿si; j Since variable-free formulas can be treated as propositional formulas, the satisÿability of the monadic ÿrst-order probability formula A is reduced to the satisÿability of the W m i propositional probability formula i=1 #D . In contrast to the most of the ÿrst-order probability logics, the propositional logics are decidable [5, 6, 17, 19, 20]. The decision procedure reduces a probability to a ÿnite number of systems of linear equalities and inequalities such that the formula is satisÿable if and only if at least one of the systems is solvable. Since the later is decidable, so it is the former. Thus, the monadic fragments of the ÿrst-order logics without iterations of probability operators are decidable.

8. The related works

In this paper we have investigated some ÿrst-order probability logics. We have given the corresponding axiomatic systems that are sound and complete with re- spect to some classes of probability models. As we have already noted this is not the ÿrst paper to consider probability logics. The ÿrst-order case, and the proposi- tional case are studied in [1, 2, 9, 13, 15, 19] and in [5, 6, 14, 17–20], respectively. In this section we will compare our approach to the approaches from some of these 210 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 papers, and will suggest how to adapt our systems to these di erent frame- works. The reader can observe that the syntax presented in Section 2 di ers from the one described in [1, 9]. The main di erence concerns allowing the so-called ÿeld terms that range over the reals and represent probabilities. For example, (∀r)((06 1 r6 2 ) → (∃y)P¿rP(y)) is a well-deÿned formula in [1, 9]. Also, probability terms of Pn the form w( ) and atomic probability formulas of the form i=1 aiw( i)¿b are al- lowed there. A formula w( )¿s can be rewritten (in our notation) as P¿s . These restrictions are made here for ease of exposition only. Our syntax can be extended in a straightforward manner, such that the set of well formed formulas from [1, 9] can be exactly obtained. Reasoning about ÿeld terms and about linear inequalities can be formalized using the axiomatization for real closed ÿelds, and the axiomatization for reasoning about linear inequalities, respectively [5]. It is shown in [1] that the set of valid formulas of the logic with probabilities on possible worlds is not recursively enumerable. Thus, no ÿnitary axiomatization is possible. By extending the axiomatic system Ax with the axioms for real closed ÿelds and linear inequalities, an inÿnitary axiomatization of that logic can be obtained. Finitary axiomatizations for some frag- ments of the logic with probabilities on possible worlds can be acquired by substituting AxFR(n) for Ax in this extended axiomatic system. In [18] other probability operators of the form QF are introduced. The intended meaning of QF is that the probability of truthfulness of belongs to the set F ⊂[0; 1]. It can be shown that in a general case neither QF -operators are deÿnable from P¿s-operators, nor P¿s-operators are de- ÿnable from QF -operators. It can be interesting to ÿnd the complexity of the logic with probabilities on possible worlds extended by these new types of operators. The assumptions about ÿxed domains and rigidness of terms in Section 2 are im- portant. It is well known that if they do not hold, some anomalies appear [7, 9]. For example, the classical ÿrst-order axiom (∀x) → (t=x), where the term t is free for x, is not valid. We can consider some other classes of models by dropping these limita- tions. If we allow world relative domains and nonrigid terms, we can follow [7] and obtain complete axiomatic systems according to the ideas given there. Models with only one discrete probability measure are considered in [1, 9]. The

LFOP2 logic has been suggested in Section 5 as a suitable approach under the assump- tion that only one probability measure is allowed in a model. The similar logics have been already given for the ÿrst-order case (with measures with ÿnite ranges) in [19], and for the propositional case in [5, 18–20]. With some modiÿcations of the axiomatic systems given here we can handle the case when discrete probability measures (i.e. when every singleton is measurable) are used. For example, an inference rule similar to the irre exivity rule given in [8] should be used. Such a rule guaranties that every world is witnessed by a particular formula, and that every singleton is measurable. Finitary axiomatizations are obtained if the considered classes of models contain only models whose measures have a ÿxed ÿnite range. The similar approach is given in [19] for the ÿrst-order probability case, and in [14, 17, 19, 20] for propositional probability logics. Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212 211

Propositional probability logics are considered in [5, 6, 14, 17–20]. In [5, 6] a ÿnitary axiomatic system for logics that are similar to LPP1, and LPP2 is given. However, the compactness theorem does not hold for LPP1 and LPP2 (neither it does for the logics from [5, 6]). Consider the set T = {¬P=0 }∪{P¡1=n : n is a positive integer}. Although every ÿnite subset of T is satisÿable, the set T itself is not. Since the compactness theorem follows easily from the extended completeness theorem (“every consistent set of formulas is satisÿable”), we cannot hope for the extended completeness when we have ÿnitary axiomatic systems for LPP1 and LPP2. Indeed, in [5, 6] only the simple completeness (“every consistent formula is satisÿable”) is proved. There is another unpleasant consequence of ÿnitary axiomatization for LPP1 and LPP2. The above set T is consistent with respect to the axiomatic systems given in [5, 6] (because all its ÿnite subsets are consistent and deductions are ÿnite sequences), while the set T has no model. It seems that the only way to avoid consistency of the set T is to employ inÿnitary logic as we have done here. Since the compactness does hold for FR(n) FR(n) LPP1 and LPP2 , these systems have ÿnitary axiomatizations [14, 17, 19, 20]. It is shown in [1] that the set of sentences valid with respect to type 2 models, as well as some restricted classes of the set (monadic formulas, for example), is not decidable. It is also proved that such undecidability results hold if only ÿnitely additive measures with rational values are allowed. Thus, our examples of some decidable subclasses of

LFOP2 formulas form a contrast to these negative results. Finally, note that there is another kind of ÿrst-order probability logics, the so-called logic with the probability on the domain [1, 2, 9, 15, 20], which is suitable for repre- senting and reasoning with statistical knowledge. There is a translation between two kinds of logics, described in [1], which is used to show that the logics are equally expressive.

Acknowledgements

This research was supported by the Ministarstvo za nauku i tehnologiju Repub- like Srbije, through MatematiÄcki institut, grant number 04M02. We are grateful to Dr. Predrag TanoviÃc for his e orts to improve our poor knowledge of English.

References

[1] M. Abadi, J.Y. Halpern, Decidability and expressiveness for ÿrst-order logics of probability, Inform. Comput. 112 (1) (1994) 1–36. [2] F. Bacchus, Lp, A logic for representing and reasoning with statistical knowledge, Comput. Intell. 6 (1990) 209–231. [3] K.P.S. Bhaskara Rao, M. Bhaskara Rao, Theory of Charges, Academic Press, New York, 1983. [4] C.B. Cross, From worlds to probabilities: a probabilistic semantics for modal logics, J. Philos. Logic 22 (2) (1993) 169–192. [5] R. Fagin, J.Y. Halpern, N. Megiddo, A logic for reasoning about probabilities, Inform. Comput. 87 (1=2) (1990) 78–128. [6] R. Fagin, J.Y. Halpern, Reasoning about knowledge and probability, J. ACM 41 (2) (1994) 340–367. 212 Z. Ognjanovic, M. RaskovicÄ / Theoretical Computer Science 247 (2000) 191–212

[7] J.W. Garson, Quantiÿcation in modal logic, in: D. Gabbay, F. Guenthner (Eds.), Handbook of Philosophical Logic, vol. II, D. Reidel, Dordrecht, 1984, pp. 249–307. [8] D.M. Gabbay, I.M. Hodkinson, An axiomatization of the temporal logic with until and since over real numbers, J. Logic Comput. 1 (2) (1990) 228–259. [9] J.Y. Halpern, An analysis of ÿrst-order logics of probability, Arti. Intell. 46 (1990) 311–350. [10] J.Y. Halpern, Knowledge, belief and certainty, Ann. Math. Arti. Intell. (4) (1991) 301–322. [11] G.E. Hughes, M.J. Cresswell, Modal Logic, Methuen, London, 1968. [12] G.E. Hughes, M.J. Cresswell, A Companion to Modal Logic, Methuen, London, 1984. [13] P. Haddawy, A.M. Frisch, Modal logics of higer-order probability, in: R. Shachter, T.S. Levitt, J. Lemmer, L.N. Kanal (Eds.), Uncertainty in Artiÿcial Intelligence 4, Elsevier, Amsterdam, 1990, pp. 133–148. [14] W. van der Hoeck, Some consideration on the logics PF D, J. Appl. Non-Classical Logics 7 (3) (1997) 287–307. [15] D.N. Hoover, Probability logic, Ann. Math. logic 14 (1978) 287–313. [16] S.A. Kripke, The undecidability of monadic modal quantiÿcation theory, Z. Mat. Logik 8 (1962) 113–116. [17] Z. OgnjanoviÃc, M. RaÄskoviÃc, A logic with higher order probabilities, Pub. Inst. Math. (NS)-60 (74), (1996) 1–4. [18] Z. OgnjanoviÃc, M. RaÄskoviÃc, Some probability logics with new types of probability operators, J. Logic Comput., to be published. [19] M. RaÄskoviÃc, Classical logic with some probability operators, Publ. Inst. Math. (NS)-53 (67) (1993) 1–3. [20] M. RaÄskoviÃc, R. DjordjeviÃc, Probability Quantiÿers and Operators, Vesta, Beograd, 1996.