Open access peer-reviewed chapter

Towards a Fuzzy Context Logic

Written By

Hedda Schmidtke

Reviewed: 22 December 2020 Published: 01 February 2021

DOI: 10.5772/intechopen.95624

From the Edited Volume

Fuzzy Systems - Theory and Applications

Edited by Constantin Volosencu

Chapter metrics overview

331 Chapter Downloads

View Full Metrics


A key step towards trustworthy, reliable and explainable, AI is bridging the gap between the quantitative domain of sensor-actuator systems and the qualitative domain of intelligent systems reasoning. Fuzzy logic is a well-known formalism suitable for aiming at this gap, featuring a quantitative mechanism that at the same time adheres to logical principles. Context logic is a two-layered logical language originally aimed at pervasive computing systems for reasoning about and within context, i.e., changing logical environments. Both logical languages are linguistically motivated. This chapter uncovers the close connection between the two logical languages presenting two new results. First, a proof is presented that context logic with a lattice semantics can be understood as an extension of fuzzy logic. Second, a fuzzification for context logic is proposed. The resulting language, which can be understood as a two-layered fuzzy logic or as a fuzzified context logic, expands both fields in a novel manner.


  • intelligent systems
  • fuzzy logic
  • context logic
  • context

1. Introduction

Fuzzy logic has been employed successfully in intelligent systems, sensor-actuator systems, expert systems, and machine learning techniques for more than 50 years [1]. Being a tool for inference at both the logical and the sensor-actuator systems level its use for reliable and explainable autonomous systems has become a focus of recent research [2, 3, 4, 5]. One key building block for this has been a growing understanding of fuzzy logic semantics over the past 20 years [6] and the position this family of logics assumes within the field of logics in general. In particular, the connection to residuated lattices plays an important role for novel perspectives [7, 8]. One such new perspective is the connection to context logic, which is developed in this chapter.

Context logic was introduced in [9, 10, 11] as a logic for representing context-dependency and context phenomena in pervasive computing systems. Recent developments in context logic focus on a logical actuator control mechanism [12, 13, 14]. This chapter presents the logic with a fuzzy logic lattice semantics highlighting the close relation between the two formalisms and the close relation between context logic and the sensory and machine learning components of intelligent sensor actuator systems (ISAS), such as robotics and autonomous vehicles. We show that context logic can be understood as a fuzzy logic since it can be given an algebraic semantics like that of fuzzy logic as based upon lattice structures.


2. Fuzzy logic and context logic

We briefly review the basics of how fuzzy logic handles quantitative information and contrast this with the approach chosen in context logic. Here, it may appear we go into basic aspects at a greater depth than what may seem necessary. However, to bring the two logics together, establishing the common ground conceptually is a critical first step.

Fuzzy logic [15] was developed as a linguistically motivated logic that was to be more akin to how human beings reason with uncertain information and how experts analyze alternatives and act upon them [16]. Its main cognitive motivation was that human beings are able to relay, for instance, control information without the use of numerical values. In fact, human language outside scientific and technical contexts rarely employs quantities to express relations regarding a scale, amounts, or probabilities. We prefer to say, e.g., rarely rather than giving an estimate about a concrete percentage, or give a color term, such as yellow, instead of providing RGB values and we reason with such information. We “compute with words” [17]. One reason for this is the inherent uncertainty of perceptual or sensory information and the presence of intersubjective differences. Rules we receive or provide verbally benefit from this vagueness, as they have a wide applicability, allow a concise formulation, and allow for intersubjective differences: two people may disagree whether a certain fruit is yellow or rather a light orange, but they will agree that to at least some degree, something that has a light orange color is yellow. A rule given by an expert to a novice, such as “if a fruit is yellow, then it is ripe,” is easy to understand for a human being, and accordingly fuzzy expert systems, fuzzy sensor-actuator systems, and the output of some fuzzy learning systems, can be understood and verified by human beings better than purely numerical systems that operate with numerical equations.

In natural language, human beings convey information about continuous sensory domains, such as color or height, by use of adjectives. The phenomena of vagueness, uncertainty, and context-dependency are the main challenges for formalization from a linguistic point of view [18]. Adjectives can be used in several different ways. The main categories are:

Positive: Anne is tall (for her age).

Comparative: Anne is taller than Betty.

Equative: Ann is as tall as Betty.

Superlative: Ann is the tallest (girl on the team).

While the comparative and equative use are most easily mapped to a corresponding ordering and equivalence relation for the dimension in question (here: height), the positive and superlative can change their applicability depending on context. If we talk about children, 1.50 m (5 ft) may be tall. If we talk about the average European female adult, this is comparatively small. Likewise, the superlative changes with the context: Ann may be the smallest person in the room and still be called the tallest while the current topic is her team. Context logic is interesting from a cognitive science perspective as it enables the modeling of such influence of the context.

From a cognitive science point of view, fuzzy logic is an interesting formalism as it addresses issues of vagueness and uncertainty that appear especially in the semantics of adjectives. But it is also one of only few approaches bridging logical reasoning and machine learning [19].

Fuzzy logic goes beyond multi-valued logics [20] by proposing semantics for approximate reasoning. In particular, [15, p.424] proposes to “[view] the process of inference […] as the solution of a system of relational assignment equations.” This emphasizes the connection to both sensor-actuator systems and classical methods of system modeling and evaluation with recent advances reaching from explainable machine learning [5] to advanced uncertainty mechanisms for ontology design [21]. Combining the two languages promises to make the full expressiveness of natural language adjectives available for modeling, reasoning, and explanation in ISAS design.


3. Fuzzy logic as a logical language

While the linguistic background facilitates usability of fuzzy logic, it is easier to see logical connections with respect to a more restrictive and conventional logic syntax. We therefore use a simple propositional logical language as a classical background language in this chapter. We adopt the following syntax for the set of all formulae LF based on a set of variables VF and a set of predicate symbols PF.

For PPF and xVF,Px is an atomic formula.For any formula ϕLF,¬ϕ is a formula.For any formulae ϕ,ψLF,ϕψ,ϕψ,and ϕψ are formula.

Using this syntax, we can formalize a proposition similar to the above example as:


We can use the usual semantics for predicate logics to interpret this sentence based on a structure UIiViP. Here U is the universe of discourse, which needs to contain in this example: the referents for the constants, i.e., concrete colors, e.g., as RGB values, and degrees of ripeness, e.g., as sets of tuples containing percentage of sugar and other substances indicative of degrees of ripeness. The term interpretation function iV:VFU maps the variable symbols ripeness and color to elements from U, distinct measurement values in a measurement value space. Predicate symbols are interpreted by the function iP:VP2U mapping out regions in U. The classical formula interpretation function I:LF01 maps formulae to values in 01.

3.1 Interpretation of predicates based on fuzzy sets

A fundamental point where fuzzy logic differs from classical predicate logic is in the interpretation of the predicates and predication: classical logic considers IYellowcolor as true iff iVcoloriPYellow, realizing predication by set membership (). Fuzzy logic, in contrast, interprets predicate symbols such as Yellow with fuzzy sets μP:U01, e.g., μYellow:U01, i.e., as functions into 01. It then can replace the classical membership function (of type U×2U01), with a fuzzy set membership function μ:U×U0101 that simply applies the fuzzy set membership function: μuμPμPu. Being based on fuzzy sets μP, formulae LF in fuzzy logic can then be interpreted with a fuzzy semantics using a suitable function I:LF01 for complex formulae.

3.2 Interpretation of connectives based on t-norms

To evaluate complex formulae, fuzzy logic requires extended semantics for the propositional connectives that can handle arbitrary values in 01, while remaining true to the classical interpretation in the cases 01. A general strategy in fuzzy logic is to allow different semantics to take the place of the classical semantics for propositional connectives (¬,,,), in particular, as t-norms (functions t:01×0101) with corresponding t-conorms (functions s:01×0101), and their residuals (r:01×0101), respectively [6]. These functions are described and discussed in more detail below. A t-norm based semantics interprets the logical language we defined above in the following way:

For QPF and xVF:IQx=μiVxiPQ=μQiVxFor any formula ϕLF:I¬ϕ=1IϕFor any formulae ϕ,ψLF:Iϕψ=tIϕIψIϕψ=sIϕIψIϕψ=rIϕIψ

3.3 Properties of t-norms

If the semantics for ∧ are based on a t-norm, this guarantees that important semantic properties of the classical conjunction are retained. A t-norm 01201 is a commutative (1), associative (2), and monotone function (3), with a neutral element 1 (4).

If xy then txztyzE3

Examples are the minimum t-norm (5), used in Gödel logics, and the product t-norm (6), used in probability theory:


The corresponding t-conorms, denoted by the symbol s and accordingly also called s-norms, can be obtained by applying De Morgan’s laws assuming the semantics of negation of a value t to be 1t. Their neutral element is 0.


The corresponding s-norms for the above example t-norms are then smin, the minimum s-norm (8), and the product s-norm sprod (9):


There are several ways to interpret the implication and different approaches are suitable for different purposes (cf. [22], for a detailed overlook and comparison). As with other operators, fuzzy implication should be conservative for values in 01. A widely used notion is the left-residual [23]:


The relation between the residual and the t-norm/s-norm are covered by two additional axioms, continuity (11) and pre-linearity (12):

txyz iff xryzE11

For the above two t-norms tmin,tprod the following are corresponding residuals:

rminab=1 iff abb otherwise.E13
rprodab=1 iff abb/a otherwise.E14

3.4 Generalized t-norms: the set-theoretic lattice

The most widely used examples of functions μP map elements of U to values in 01, with, e.g., the minimum or product t-norm. However, fuzzy logic can be given a generalized t-norm semantics based on residuated lattices, i.e., other lattice structures L instead of 01. A particularly interesting residuated lattice for the purposes of comparison with context logic is L=2B, where B is a given base set and U=B. Given this structure, we can define interpretation functions iV:VFB for variable symbols as before. But we can now interpret predicates not with classical 01-fuzzy sets but with generalized L-fuzzy sets μP:B2B, so that I:LF2B for formulae:

IPx=μPiVx,with μP:U2BE15

The intuition behind this is to map elements xU to, e.g., sets of points, i.e., spatial regions or temporal or sensory values intervals. Instead of saying x is P to a degree of 0.5, for instance, we could thus distinguish x as in a specific area of space, time, or sensor value space. E.g., we can assign a function μYellow to map measured RGB colors x to sets that form a filter around the color #FFFF00. Measuring an orange x and a lime y we could determine they are yellow to the same degree as μYellowx and μYellowy yielding the same large region around the core value #FFFF00. We could say x is as yellow as y is yellow, since with IYellowx=IYellowy holds IYellowxYellowy=2B. This would be the same result as with classical fuzzy sets, but we would be able to additionally avoid comparing incompatible contexts, e.g.: while a red apple z may be as aubergine as an orange is yellow with classical fuzzy sets, the set theoretic interpretation yields IYellowxAuberginezIYellowxYellowy, as the regions for IYellowx and IAuberginez overlap but are distinct. In contrast to the strictly ordered 01, the partially ordered 2B thus allows higher expressiveness.

Partial orders and corresponding lattice structures are at the heart of the semantics for context logic, and the two languages can on this basis be combined in a natural manner.


4. An overview of context logic

We now specify the context logic language and describe a semantics similarly in terms of a predicate logical language, which in turn can be related to lattice structures and thus fuzzy logical semantics.

4.1 Contextualization in context logic

Context logic has only one type of basic entity, context variables, and a single partial order relation (part of or sub-context): the city of London, for instance, is a sub-context of England, and March 2017 is a sub-context of the year 2017:


The language provides three term operators (intersection), (sum), and (complement).

Since any pre-order can be expressed as a sub-relation of a partial order relation, and be extended to a partial order relation over its equivalence classes, the single sub-context relation together with the operators allows the specification of arbitrarily many different partial order relations [24]. More accurately we may, for instance, want to say that the city of London is a spatial sub-context or a sub-region of England, and that March 2017 is a temporal sub-context or a sub-interval of the year 2017.


This and the following examples feature one simple spatial sub-context and one temporal sub-context relation. We can in the same manner however express, for instance, directional relations [25], temporal ordering relations (bi-directionally branching), and class hierarchies [9]. Ordering relations between thematic values, such as expressed by the comparative use of adjectives (Section 2) can also be added in the same way. The main purpose of the language is to facilitate expressing the common partial order core of all these theories, including the tractable fragments of these theories in a unified syntax.

A syntactic shorthand reflects – linguistically speaking – a topicalized adverbial position:


Spatially, London is a sub-context of England. Temporally, March 2017 is a sub-context of the year 2017. For entities such as cities or months, this may seem redundant. But contexts, such as a birthday party, which have both temporal and spatial extent can thus be located temporally within one context and spatially within another:


We can also reflect that speakers may choose to topicalize the other way around [26], as the last two sentences are logically equivalent to the following:


or, leveraging the propositional second layer,


where, for any propositional junctor :


Regarding John’s birthday party: the location is in London, the time is in March 2017. Moreover, we can allow contexts to be stacked or combined, in order to express more complex contextualization:


Similarly to how we would express conflicting opinions in natural language, we can equivalently state:


Regarding John’s birthday party and the time, Mary says in March 2017 and Tom says in August 2017. Context logic thus allows to reflect colloquial contextualizations well, but also to represent conflicting information.

4.2 Context logic as a logical language

Context logic thus employs two syntactic layers: the term layer with the term operators ,, and the propositional layer with the logic connectives (,,¬,). Context terms TC are defined over a set of variables VC:1

Any context variable vVC and the special symbols  and are atomic context terms.
If c is a context term,thenc is a context term.
If c and d are context terms then cd and cd are context terms.

Context formulae LC are defined as follows:

If c and d are context terms then cd is an atomic context formula.
If ϕ is a context formula,then¬ϕ is a context formula.
If ϕ and ψ are context formulae then ϕψ,ϕψ and ϕψ arecontext formulae.

We further define:


Different variant semantics have been proposed [10, 11, 26]. The different approaches slightly differ in the resulting semantics, but all three employ a lattice structure for specifying the meanings of context terms, assigning a partial order to give a semantics to . Here, we give a semantics by mapping the language to a predicate logic with a single binary predicate P, describing a pre-order relation, to give the fundamental its semantics. We use a function τCLPL:LC×VPLP, where LC is the set of context logic formulae, VP is a vocabulary of predicate logic variables, and LP is the set of predicate logic formulae. We also employ VC, the set of variables, as the set of constants for LP, and require VPVC=:

τCLPLvm=Pmv,for vVCE24
τCLPLcm=τCLPLcm for cTCE25
τCLPLcdm=m,Pmm:m,Pmm:τCLPLcmτCLPLdmwhere m and m are new variables.E27
τCLPLcdm=m,Pmm:τCLPLcmτCLPLdmwhere m is a new variable.E28

We note that although we introduce new variables m,m in (27) and (28), each new variable is only used together with the variable last introduced – m with m, m with m but not with m –, not with any other variables introduced before. This means, we can alternate between two variables and reuse m after m, i.e., that VP=mm. We also note, that the context variables vVC are constants with respect to the predicate logic and that they only appear in the second position of P in (24). This property allows us to reformulate any binary expression Pmv for vVC using a different monadic predicate Pv for each vVC, and write Pvm instead of Pmv.

Consequently, the fragment of predicate logic required in application of τCLPL alone is in the two-variable fragment known to be decidable. Moreover, the variables, such as m and m, only occur together in the atomic guard, as Pmm, suggesting that the language as defined so far is in the so-called guarded fragment GF [27] defined as [cited after 28, p.1664f]:

Every atomic formula belongs to GF.
GF is closed under¬,,,,.

If x, y are tuples of variables, α(x, y) is an atomic formula, ψ(x,y) is in GF, and free (ψ ⊆ free (α) = {x,y}, where free (ϕ) is the set of the free variables of ϕ, then the formulae

belong to GF.

In order to obtain the reasoning capabilities, however, we would need to add pre-order axioms for P, so as to be able to specify as a partial order relation:


and we see that transitivity (13) cannot be axiomatized in the two-variable fragment, as it requires three variables. Fortunately, [28, 29] have shown that for GF2 + PG – the guarded fragment limited to two variables and a single binary pre-order that can only appear in the guard – is in 2-EXPTIME. Moreover, this result is a loose upper bound, since the language under inspection here can be expressed using the transitive binary relation P in only one direction – namely from wholes to parts –, using otherwise only the monadic predicates Pv,vVC, placing the translation of context logic with the axioms for into the class MGF2+TG, the two-variable monadic guarded fragment with one-way transitive guards, which is decidable and whose satisfiability problem is in EXPSPACE [28].

In addition to the pre-order axioms, we can also add a localized guarded variant of the so-called weak supplementation principle [30, Ch. 3] for ensuring a minimal homogeneity constraint over v1,v2VC:2


The principle says that, if for any x all its parts x that are in v1 are also in v2, but there is a part x that is in v2 but not in v1 (paraphrasing: v1 is a proper part of v2), then there is a part x of v2 that has no parts in v1 (i.e.: x does not overlap v1), i.e., is completely outside of v1. Axiom 35 ensures that the entities described by v1,v2VC do not have, e.g., singular points that are not entities themselves in the domain under inspection. This axiom is required for proving several of the lattice laws. Note that we thus characterize a weak supplementation principle only for , that we, however, cannot formulate a weak supplementation principle for P without leaving the guarded fragment.

In order to do this, however, we have to employ v1,v2VC as schema variables, i.e., we have to formally see this actually not as one axiom but VC2 axioms. This means that for infinite VC, the axiomatization becomes infinite. For practical, finite knowledge bases, VC will be finite. If an infinite vocabulary VC is employed, a practical realization would be to use a unification mechanism suitable for the particular language VC employed.

Intuitively, the meaning of ab is that all parts of a are part of b. The reading thus corresponds to a universal quantification, and the properties expressed by contexts in this statement describe homogenous properties inherited from wholes to their parts. Correspondingly, ¬ab expresses an existential quantification, stating that not all parts of a are parts of b, which means that there is a part of a that is not part of b, or that does not have property b. We can thus express heterogeneity.

The complement c, is interpreted with respect to the pseudo-0-element : the atomic formula a is interpreted as equivalent to a, meaning that no part is in a, implying universal quantification. There are thus two types of negation ¬ on the logical level and on the context level. is a pseudo-element, it disappears in the translation when applying (28). We do not need to assume that an empty element exists:


A crucial consequence of adopting weak supplementation (35) is (2). It says that if all parts m of a part m have a part m that is part of a, this is equivalent to m being part of a:


Proof (⫤): this holds immediately with the reflexivity (34) and transitivity (33) of P: if Pma then all parts m of m fulfill Pma by transitivity, and therefore there is a part m of m, namely m itself, by reflexivity, so that Pma.

Proof (): we prove the reverse direction by contradiction, applying (35). Assume m,Pmm:m,Pmm:Pma and not Pma, i.e., that there is an m1 that has m,Pma but not Pm1a. Then by (35) there has to be a part m2 of m that does not have a part m where Pma. But this is prevented by the premise m,Pmm:m,Pmm:Pma.

It can be shown (Section 4.4) that the definition of τCLPL together with the two pre-order axioms and the local guarded variant of the weak supplementation principle is sufficient to characterize context terms as spanning a bounded lattice. We note that with a different axiomatization other types of lattice structures could be realized for different application domains.

4.3 A fuzzy logic perspective on context logic

This section shows context logic as specified above is a two-layered language with a generalized t-norm-based fuzzy logic at the term level and a classical 01-based semantics at the formula level. From there it is a small step to also add a 01-based multivalued semantics to the formula level, so as to obtain a full two-layered fuzzy logic in Section 5.

To see that the context terms TC can be viewed as a generalized t-norm, we set the intersection , the meet operation of the lattice, as the monoid operation and the term as the identity element of the monoid. The monoid properties associativity and identity element are fulfilled by any lattice (see Section 4.4, (44) and (46)). For the generalized fuzzy logic semantics, the lattice meet-operation will be shown to fulfill the properties of a t-norm, the join-operation , those of the corresponding s-norm. Both are required to be commutative (1), associative (2), and support an identity element (4) and monotonicity (3) (for the full proofs see Section 4.4). We prove monotonicity for (38) and (39):


Proof (3): if every m that is part of a is in c and every m that is part of b is in d, then every m that is part of a and b is also in both c and d. Proof (4): we see that it follows from this condition also that any m that exists as part of any m in a or b must also be part of c or d in m.

The generalized De Morgan law connects t-norms with s-norms (7). It follows for the translations of and directly from the De Morgan laws in predicate logic.


The residual can then be derived from its characterization:


The operation with the definition


has the required property tazb (with the t-norm and , the lattice partial order ).3


We prove that for any m,Pmm:


and the term ab expresses the maximal element local to m with this property.

Proof: assume the antecedent is true, then because of transitivity of P (33) and the conjunct Pma, there can be no m part of m for which all parts miv, including m itself fulfill ¬Pmiva. Therefore the second disjunct Pmb must be true. But if we know that for all m with Pmm exists m, so that Pmb, we know by (2), a consequence of the localized guarded variant of the weak supplementation principle (35), that Pmb. To see that it is maximal, assume there is m1 outside of ab and Pm1a and Pm1b. To be outside of ab, there would have to be an m,Pmm1 so that for all m,Pmm there is miv, so that Pmivm and Pmiva and ¬Pmb, but this cannot be, because Pmm1 and by the assumption Pm1b, thus by transitivity (33) Pmb.

This result indicates that, at least with respect to the supplementation property expressed through (35), ab fulfills the characterization of a residual. We can also show continuity (54) and pre-linearity (55) (Section 4.4).

We are thus justified to say that context logic terms have a generalized t-norm semantics and we can give a t-norm-based semantics to context logic.

We obtain: a t-norm-based classical semantics for context logic is a structure IiaLT1Tts, where the terms are interpreted by i:TCLT together with the function a:VCLT assigning context terms and variables, respectively, to elements of a lattice LT, and the formulae, by the classical interpretation function I:LC01:

iv=av,for vVC

With 1Ticthe pseudo-complement of the lattice

Icd=1 iff icid

It only remains to show that the context term operators indeed support the lattice requirements.

4.4 Proof: context logic with local, guarded weak supplementation characterizes a bounded lattice

For the purpose of completeness, the proofs are listed here in detail. However, the results are part of basic, fundamental lattice theory and no novelty is claimed.

We prove that and fulfill the laws for a bounded lattice. We start by showing that fulfills the laws of a semilattice: is idempotent (7), associative (8), commutative (9), and has as its neutral element (46).


These properties hold, since directly translates into :


We show the translations:


We can see that all translations of properties are tautologies and follow directly from the properties of . The semantics of requires a closer look. We first note that a basic requirement of extensionality holds:


The property (47) holds because Pma entails Pma for all Pmm because of transitivity of P. Also, for all m,Pmm: Pma entails Pma, since P is reflexive.

We can now prove the semilattice laws for .


When we translate idempotency (48):


we see that the translation of provides one direction of the proof. With (2), a consequence of weak supplementation, we obtain the other direction.

The other laws follow in a similar manner. We show associativity (49):


By proving the following for any m from which the above then follows directly via the associativity and commutativity of :


We prove in two steps.

Proof (): assume we choose an arbitrary m,Pmm. The antecedent says that if there is an m,Pmm so that Pma or there is Pmm so that for all its parts miv, we can find mv, so that Pmvb or Pmvc. If there is an m,Pma, the consequent holds. If there is no such m,Pma, there must be an m, so that all its parts miv have a part mv in b or c. Since each such mv is also a part of m, we can conclude that for all m,Pmm there is an m – namely, the mv we identified –, so that PmbPmc.

Proof (⫤): assume we have for each m,Pmm: m,Pmm:PmaPmbPmc and the consequent is false. In this case, there must be an m1, so that Pma must be false for all m,Pmm1 and that there is a part of any such m so that all its subparts are neither in b nor in c. By the premise however, we know that m1 must have a part m1 so that Pm1bPm1c. But since P is transitive we know that for all parts m1iv of m1 holds either Pm1ivb or Pm1ivc. By reflexivity we moreover know that each m1iv has a part, namely itself, for which Pm1ivb or Pm1ivc hold.

Applying this result twice via the associativity and commutativity of , we can conclude (49) must hold:


Theorem 14 holds immediately given the definition of the translation for and the commutativity of :


Proving the neutral element property (51) requires (35).


The proof follows immediately by (2).

In summary, we needed (35) for proving idempotency (48) and the neutral element (51). Associativity (49) and commutativity (50) were proven without using (35).

We have thus shown that and each create a semilattice structure over the xVC. When we prove the absorption laws, we see that the absorption law (52) can be proven without requiring (35), while the proof for the absorption law (53) uses it:


For (52):


we show that for any m:


Proof (⫤): this holds because of transitivity (33) and reflexivity (34) of P. If Pma, is true, we know m,Pmm:mPmm:Pma is also true and thus also the disjunct. Therefore, the whole consequent must be true.

Proof (): here we already know Pma in the antecedent, so the consequent cannot be false.

We prove (53):


by showing for any m:


Proof (): m,Pmm:mPmm:PmamPmm:PmaPmb is true iff m,Pmm:mPmm:Pma is true, and this entails Pma by (2). Proof (⫤): this holds by transitivity and reflexivity.

The relation between the residual and the t-norm were covered by two additional axioms above: continuity (11) and pre-linearity (12):

xyz iff xyzE54

We prove continuity (54) by translation using τCLPL.

τCLPLxyzmτCLPLxyzm translates into:m,Pmm:PmxPmyPmzm,Pmxm,Pmm:m,Pmm:¬mivPmivm:PmivyPmz

Proof (): assume the antecedent holds, and Pmx for some m. Then, for m,Pmm:Pmz to be false, there must be an m1,Pm1m, so that m,Pmm1:mivPmivm:Pmivy and m,Pmm1:¬Pmz. However, if m,Pmm1:mivPmivm:Pmivy holds then by (2), Pm1y and by transitivity also Pm1x and by the assumption thus Pm1z, which cannot hold since all parts m of m1 including by reflexivity m1 itself fulfill ¬Pmz.

Proof (⫤): assume the antecedent m,Pmx:Pmz holds. For m,Pmm:PmxPmyPmz to be false, there must be m1,Pm1m, so that Pm1x and Pm1y must hold, but Pm1z must be false. But then we also know that m,Pmm:¬mivPmivm:Pmivy cannot hold for any m,Pmm1. Thus, m,Pmm:Pmz must hold for all m, and thus by (2) Pm1z.

We prove pre-linearity (55):


by showing for anym,Pmm:


Proof: we obtain for the antecedent:


Since this holds for all m,Pmm it also holds for m itself, i.e., it follows that:


We rename the variables to better show the structure:


and by (2):


We now know that m has a part m that is in x and none of its parts is in y. With Pmx, however we also know by transitivity of P that all parts m,Pmm fulfill Pmx, and thus by reflexivity of P that there is an miv,Pmivm, namely miv=m, for each m, which fulfills Pmivx. Moreover, since all parts mv,Pmvmiv are by transitivity also parts of m, we know that ¬mv,Pmvmiv:Pmivy and thus:


which entails the consequent.

4.5 A note on mereological and ontological status

The mereologically interested reader may notice that adding even the weakened variant of the weak supplementation principle is sufficient to collapse context logic term structures to a single level by (2). The reason for this is that the weak supplementation principle considerably strengthens the expressiveness of negation, which given the principle always ensures the existence of a fully negative individual. This is the case, although our system mereologically speaking is an MM system, i.e., supports M1-M4 [30] only, with M4 acting as an axiom schema.

We may note also, that we need not ensure product (M5) or sum (M6) to exists, nor do we need or posit a universal or null object to exist. The symbols ,,,, are, so to speak, “syntactic sugar” only. The assumed mereology thus is slightly weaker than MM and ontologically careful and minimalistic. For a deeper discussion, cf. [30, 31].

4.6 Example: set-theoretical model

To make the discussion more concrete, we briefly sketch a set-theoretical interpretation. An example of a suitable model is the set-theoretic lattice, assuming the set of all subsets of a base universe as the universe for the interpretation of the translation τCLPLϕm of a context formula ϕ, and mapping t to (17), s to (18), and the residual r according to (19). Note that, within this interpretation, the variables m,m,etc., as well as the constants a,b,c, etc. of the translation τCLPLϕm range over sets, not elements, of the base universe. With a set-theoretical model IiaUB, where U2B for B, the base set, we get:

iv=av for vVC
Icd=1 iff icid

We can show that, if the canonical interpretation IiaUB is a model for formula ϕ, then there is a corresponding predicate logic model for τCLPLϕm with interpretations for m,m from U2B, interpreting P as and individuals vVC using an assignment function a:VC2B. While we allow the constants vVC to be empty, the variables used to describe their extension cannot.

The pre-order axioms for P obviously hold for . Also, the weak supplementation principle holds for :


Proof: assume a set xx supports that xa implies xb, and there is a set x1x supporting x1b but not x1a. We can then construct x2x as x2=x1a, which supports that x2b and none of its subsets x2x2 supports x2a.

We prove that ,, over non-empty sets m,m,m fulfill the characteristic properties for translations for ,,, respectively:


The case of (20) is immediately clear. For (21), we look at the definition of in terms of elements PB, which we call points:


Proof (): if the points in m are in a or in b in the first step, then, since the m are non-empty, it follows that each mm has a point either in a or in b. In the second step, if there is a point P in each m, that is in a or in b, then there is a set mm, namely the singleton containing P, for which ma or mb must hold.

Proof (⫤): assume that for every m, there is a non-empty mm, with ma or mb, then, since m non-empty, it must have a point Pa or Pb. Since this holds for all non-empty sets m, including all singleton sets, which have only one element, it must hold for all points Pm.

For (22), we similarly look at the definition of in terms of elements of m, i.e., points:


Proof (): the property carries over to all parts m of m in the second step. The third step follows, because any set mm must be non-empty, and if it contains a point, ma cannot be true, since no point in m is in a and is transitive.

Proof (⫤): as in the proof for , we can argue over singleton sets. If for all sets m, no subset m is subset of a, then this also holds for the singletons, and thus no set m has a point P in a, but this again holds also for singleton sets mm, and thus all points of m are outside a.

We have thus seen that the set-thoretical standard model is a concrete example of a structure for interpreting context terms and formulae.


5. A fuzzy context logic

The key to the proposed fuzzy context logic is to additionally provide a fuzzy interpretation for the atomic formulae, via the symbol . To do that, we need a residual that takes two elements from the context lattice and produces a fuzzy value in 01. Then we can apply one of the well-known standard fuzzy semantics to the formula level.

The fuzzy semantics is defined by two lattices: a bounded lattice LTTtTsT1T for the term level, and another bounded lattice LFFsFtFrF1F, where LF=01 for the formula level together with the interpretation functions a:VCLT for context variables, i:TCLT for terms, and I:LCLF for formulae. We interpret the terms as before based on LT:

iv=av,for vVC

with the 1Ticterm-level pseudo-complement


We will need to characterize a fuzzified variant of T to obtain atomic formulae that can have a value outside of {0, 1}:


On this basis, the interpretation of formulae can then follow one of the standard models of fuzzy logic in LF:


The key is to provide a function TF:LT×LTLF for connecting the fuzzy term and formula layers. As usual, we want the relation to be conservative with respect to the classical partial order relation on the classical cases:

TFxy=1Fiff xTy.TFxx=1Fholds for all xLT.IfTFxy=1F andTFyx=1Ffor x,yLT then x=y.IfTFxy=1F andTFyz=1F then alsoTFxz=1F.

What is a good choice depends on both LT and LF, and given a particular choice, different functions may support this weak restriction. A candidate for spatial applications for LT=2B for a base set B and LF=01 is a fuzzified variant of the qualitative granular relation systems proposed in [32]. Here, several types of granular relations between regions are distinguished based on an absolute ranking of sizes, such as the largest circle a spatial region is contained in, or its diameter, or the length of an interval. Complementing topological notions, such as part-of or overlap, granular relations can be defined [32]:

  • Two regions are adjacent iff they overlap but only in a part smaller than grain-size.

  • Two regions are spatially indistinguishable iff they differ only in a part smaller than grain-size.

  • Two regions relevantly overlap iff they overlap in a part larger than grain-size and differ in a part larger than grain-size.

We can generalize this notion using a 01 perspective instead of a discrete partitioning of the space of possible overlap-relations. For the example of a set-theoretical model, we could proceed, e.g., to find a fuzzification of into a function TF mapping to 01 by assessing the largest difference between two arguments x,y in comparison to the diameter of x. The intervals 1446 and 1446, for instance differ only in boundary points. The intervals x=1134 and y=1236 overlap in xy=1234. With the overlap xy=1234=12 and x=1134=13, this is an overlap of xy/x=12/13=92%.

Generally, we can employ a granularity function γ:LTR+ to compute a mapping from entities of LT to R+. Based on this, we can use a suitable function r:LTLF to make the transition between the term layer and the formula layer in such a way that it also connects appropriately to the basic properties of the residual rF, e.g., by employing rF itself:


We obtain a fully specified family of fuzzy context logics. Note that with rF=rprod, we receive the conditional probability:

rprodγxγxy=γxyγx=1if xyγxyγxotherwise

For rF=rmin we obtain:

rminγxγxy=1iff xyγxyotherwise.

Among the potential applications, a two-layered fuzzy logic can help to reason about fuzzy logic systems. The base logic being decidable for the classical semantics, we can, at least for the classical case, make absolute guarantees for a given system. We can prove whether a given fuzzy system, e.g., the output of a machine learning mechanism, such as an ANFIS, together with a description of possible situations in the domain and desirable properties yields a tautology, thus proving that the system has the desirable properties under all possible circumstances. If we are interested in gaining an understanding of systems that are not tautological in this sense, so as to obtain, e.g., degrees of possibility of failure under certain circumstances, more advanced fuzzy proof methods are required.


6. Conclusions

This chapter illustrated that the lwo-layered logic context logic and fuzzy logic can be combined in a meaningful way. We first mapped both logics to a predicate logical background language, so as to highllight their commonalities and differences and to obtain a background compatible with both. In both cases, we discussed a common set-theoretical model that can be used to interpret the background language. We formally proved that the lattice-based generalized t-norms of fuzzy logic provide a suitable semantics for the term-layer of context logic. To do this, we expressed context logic in terms of a single pre-order relation that additionally supports the weak supplementation principle and showed that, with this translation providing semantics, context logic fulfills the properties of a residuated lattice. We also derived that the language is decidable in EXPSPACE.

The formula-layer of context logic could then additionally be imbued with a 01-based fuzzification. Proposals for adding either the product t-norm or the minimum t-norm for the formula layer on top of the lattice-based generalized t-norm of the context term layer were suggested, and a mechanism for combining this with granularity to further expand expressiveness was discussed.



This work was financially supported by the Hanse-Wissenschaftskolleg, Delmenhorst, Germany; and received infrastructural support from the University of Bremen, Germany.


  1. 1. Dubois D, Prade H. The emergence of fuzzy sets: A historical perspective. In: Fuzzy logic in its 50th year, pages 3–19. Springer. 2016
  2. 2. M. Mendler, J. Aguado, B. Bodin, P. Roop, and R. von Hanxleden. Logic meets algebra: Compositional timing analysis for synchronous reactive multithreading. In Models, Mindsets, Meta: The What, the How, and the Why Not?, pages 45–67. Springer, 2019.
  3. 3. B. M. Keneni, D. Kaur, A. Al Bataineh, V. K. Devabhaktuni, A. Y. Javaid, J. D. Zaientz, and R. P. Marinier. Evolving rule-based explainable artificial intelligence for unmanned aerial vehicles. IEEE Access, 7:17001–17016, 2019.
  4. 4. E. Lughofer. Model explanation and interpretation concepts for stimulating advanced human-machine interaction with “expert-in-the-loop”. In Human and Machine Learning, pages 177–221. Springer, 2018.
  5. 5. B. Ruprecht, W. Wu, M. A. Islam, D. Anderson, J. Keller, G. Scott, C. Davis, F. Petry, P. Elmore, K. Nock, et al. Possibilistic clustering enabled neuro fuzzy logic. In 2020 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), pages 1–8. IEEE, 2020.
  6. 6. P. Hájek. Metamathematics of fuzzy logic, volume 4 of Trends in Logic. Springer Science & Business Media, 1998.
  7. 7. S. Rasouli, Z. Zarin, and A. Hassankhani. Characterization of a new subquasivariety of residuated lattice. Journal of applied logics-The IfCoLog journal of logics and their applications, 5(1):33–63, 2018.
  8. 8. D. Dubois, H. Prade, and A. Rico. Graded cubes of opposition and possibility theory with fuzzy events. International Journal of Approximate Reasoning, 84:168–185, 2017.
  9. 9. H. R. Schmidtke and W. Woo. Towards ontology-based formal verification methods for context aware systems. In H. Tokuda, M. Beigl, A. Brush, A. Friday, and Y. Tobe, editors, Pervasive 2009, pages 309–326. Springer, 2009.
  10. 10. H. R. Schmidtke, D. Hong, and W. Woo. Reasoning about models of context: A context-oriented logical language for knowledge-based context-aware applications. Revue d’Intelligence Artificielle, 22(5):589–608, 2008.
  11. 11. D. Hong, H. R. Schmidtke, and W. Woo. Linking context modelling and contextual reasoning. In A. Kofod-Petersen, J. Cassens, D. B. Leake, and S. Schulz, editors, 4th International Workshop on Modeling and Reasoning in Context (MRC), pages 37–48. Roskilde University, 2007.
  12. 12. H. R. Schmidtke. A survey on verification strategies for intelligent transportation systems. Journal of Reliable Intelligent Environments, 4(4):211–224, 2018.
  13. 13. H. R. Schmidtke. Textmap: A general purpose visualization system. Cognitive Systems Research, 59:27–36, 2020.
  14. 14. H. R. Schmidtke. Logical rotation with the Activation Bit Vector Machine. Procedia Computer Science, 169:568–577, 2020.
  15. 15. L. A. Zadeh. Fuzzy logic and approximate reasoning. Synthese, 30(3):407–428, 1975.
  16. 16. L. A. Zadeh. Fuzzy logic. Computer, 21(4):83–93, 1988.
  17. 17. L. A. Zadeh. Fuzzy logic= computing with words. IEEE transactions on fuzzy systems, 4(2):103–111, 1996.
  18. 18. M. Bierwisch. The semantics of gradation. Dimensional adjectives, 71:261, 1989.
  19. 19. J.-S. R. Jang. ANFIS: adaptive-network-based fuzzy inference system. Systems, Man and Cybernetics, IEEE Transactions on, 23(3):665–685, 1993.
  20. 20. S. Kundu and J. Chen. Fuzzy logic or Lukasiewicz logic: A clarification. In Z. W. Ras and M. Zemankova, editors, Methodologies for Intelligent Systems: 8th International Symposium, ISMIS ‘94 Charlotte, North Carolina, USA, October 16–19, 1994 Proceedings, pages 56–64. Springer Berlin Heidelberg, Berlin, Heidelberg, 1994.
  21. 21. F. Bobillo and U. Straccia. Generalizing type-2 fuzzy ontologies and type-2 fuzzy description logics. International Journal of Approximate Reasoning, 87:40–66, 2017.
  22. 22. M. mas, M. Monserrat, J. Torrens, and E. Trillas. A survey on fuzzy implication functions. IEEE Transactions on fuzzy systems, 15(6):1107–1121, 2007.
  23. 23. F. Esteva and L. Godo. Monoidal t-norm based logic: towards a logic for left-continuous t-norms. Fuzzy sets and systems, 124(3):271–288, 2001.
  24. 24. H. R. Schmidtke. Contextual reasoning in context-aware systems. In Workshop Proceedings of the 8th International Conference on Intelligent Environments, pages 82–93. IOS Press, 2012.
  25. 25. H. R. Schmidtke and M. Beigl. Distributed spatial reasoning for wireless sensor networks. In Modeling and Using Context, pages 264–277. Springer, 2011.
  26. 26. H. R. Schmidtke, H. Yu, P. Masomo, A. Kinai, and A. Shema. Contextual reasoning in an intelligent electronic patient leaflet system. In P. Brézillon and A. Gonzalez, editors, Context in Computing: A Cross-disciplinary Approach for Modeling the Real World, pages 557–573. Springer, 2014.
  27. 27. H. Andréka, I. Németi, and J. van Benthem. Modal languages and bounded fragments of predicate logic. Journal of Philosophical Logic, 27(3):217–274, 1998.
  28. 28. E. Kieronski. On the complexity of the two-variable guarded fragment with transitive guards. Information and Computation, 204(11):1663–1703, 2006.
  29. 29. E. Kieronski and L. Tendera. Finite Satisfiability of the Two-Variable Guarded Fragment with Transitive Guards and Related Variants. ArXiv e-prints, November 2016.
  30. 30. R. Casati and A. C. Varzi. Parts and Places: the Structure of Spatial Representations. MIT Press, 1999.
  31. 31. P. Simons. Parts – A Study in Ontology. Oxford University Press, Oxford, 1987.
  32. 32. H. R. Schmidtke and W. Woo. A size-based qualitative approach to the representation of spatial granularity. In M. M. Veloso, editor, Twentieth International Joint Conference on Artificial Intelligence, pages 563–568, 2007.


  • We leave out brackets as possible applying the following precedence: ∼,⊓,⊔,⊑,:,¬,∧,∨,→,↔. The scope of quantifiers is to be read as maximal.
  • The interested reader may find a brief discussion on mereological and ontological properties in Section 4.5.
  • To understand the meaning of a⇒b, we can translateτCLPL⊤⊑∼a⊔bx≡∀m′,Pm′m:∃m″,Pm″m′:¬∃m‴Pm‴m″:Pm‴a∨Pm″b≡∀m′,Pm′m:¬∀m″Pm″m′:∃m‴Pm‴m″:Pm‴a∨∃m″,Pm″m′:Pm″b≡∀m′,Pm′m:∀m″Pm″m′:∃m‴Pm‴m″:Pm‴a→∃m″,Pm″m′:Pm″b≡∀m′,Pm′m:Pm′a→∃m″,Pm″m′:Pm″b≡∀m′,Pm′m:Pm′a→Pm′b,

Written By

Hedda Schmidtke

Reviewed: 22 December 2020 Published: 01 February 2021