{'fraction_non_alphanumeric': 0.07220130770754904, 'fraction_numerical': 0.010857935407172578, 'mean_word_length': 3.802283539486204, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Transitive Closures of Ternary Fuzzy Relations

Recently, we have introduced six types of composition of ternary fuzzy relations. These compositions are close in spirit to the composition of binary fuzzy relations. Based on these types of composition, we have introduced several types of transitivity of a ternary fuzzy relation and investigated their basic properties. In this paper, we prove additional properties and characterizations of these types of transitivity of a ternary fuzzy relation. Also, we provide a representation theorem for ternary fuzzy relations satisfying these types of transitivity. Finally, we focus on the problem of closing a ternary fuzzy relation with respect to the proposed types of transitivity.


INTRODUCTION
Probably the most important property of binary relations is the transitivity property. This classical concept has been generalized in fuzzy set theory by the * -transitivity property of fuzzy relations, where * is a t-norm [1]. Using the definition of composition of relations, the transitivity property can be formulated more concisely, such that a binary (fuzzy) relation R is transitive if and only if R•R ⊆ R. In addition to its key role as a condition for various important classes of binary (fuzzy) relations (such as preorder relations, order relations and equivalence relations), it is an essential tool in many fields of application, for instance, in the fields of (fuzzy) preference modelling and multi-criteria decision making [2][3][4], the study of indistinguishability/equality relations on the real line [5][6][7] and in fuzzy control [8].
In recent years, the interest in ternary relations is on the rise, as they play an important role in many theoretical and applied areas. From a theoretical point of view, ternary relations have been studied in algebra [9,10], (fuzzy) triadic formal concept analysis [11][12][13] and logic [14]. In applications, ternary (fuzzy) relations can be encountered in various areas, such as social sciences (e.g., philosophy [15]), biology (e.g., modelling of phylogenies [16]) and computer science (e.g., the Resource Description Framework (RDF) [17]). Some classes of ternary relations recently came to play an important role in specific applications, e.g., betweenness relations in models for decision making [18] and aggregation [19], ternary order relations in string matching [20], cyclic orders in qualitative spatial reasoning [21] and particular ternary fuzzy relations in models of choice behavior [22].
In the ternary setting, the notion of transitivity has received far less attention and has appeared only in a few papers. For instance, Pitcher and Smiley [23] have defined several notions of four-point transitivity and five-point transitivity of a betweenness relation. Also, Novák and Novotný [24], Chajda et al. [9], Barkat et al. [25] and Zedam et al. [26] have defined other types of transitivity of a ternary relation.
In practice, however, the transitivity of a (binary or ternary) relation is quite often violated. The most common repair strategy is to consider its transitive closure: the smallest transitive relation (if it exists) that includes the given relation. Such transitive closures play an important role in many different areas in mathematics and computer science. Closures (and openings) of ternary relations have been studied recently by Zedam et al. [27] for a broad range of properties, including various transitivity properties.
Motivated by the increasing interest in ternary relations and the usefulness of the transitivity property of binary (fuzzy) relations, in a recent conference paper [28], we have introduced six types of composition of ternary fuzzy relations with the aim of studying the transitivity of ternary fuzzy relations in a similar way as in the binary case. The introduced types of composition of ternary fuzzy relations are generalizations of the types of composition introduced by Bakri et al. [29] in the crisp case. In this paper, we further extend the study of the six corresponding types of transitivity of ternary fuzzy relations. Also, we provide a representation theorem for ternary fuzzy relations possessing one of these types of transitivity, thus addressing one of the recurrent questions in the study of fuzzy relations. The main contribution of this paper is the study of the problem of closing a ternary fuzzy relation with respect to the proposed types of transitivity. It will turn out that such transitive closure always exists for the six types of transitivity. However, it can only be written as the union of powers for the types of transitivity corresponding to associative compositions. This paper is organized as follows. In Section 2, we recall some basic concepts related to residuated lattices and t-norms, as well as binary and ternary fuzzy relations. In Section 3, we extend the compositions of ternary relations to ternary fuzzy relations and investigate their basic properties. In Section 4, we introduce several types of transitivity of a ternary fuzzy relation and show their properties. Also, we study the interaction of these properties with the binary projections and cylindrical extensions. In Section 5, we provide a representation of a given transitive (resp. reflexive and transitive) ternary fuzzy relation in terms of its binary projections and an appropriate family of functions. We study the problem of closing a ternary fuzzy relation with respect to the proposed types of transitivity in Section 6. Finally, we present some concluding remarks in Section 7.

PRELIMINARIES
First, we recall some basic concepts related to residuated lattices. Second, we present some basic definitions related to binary and ternary fuzzy relations.

Complete Residuated Lattices
A poset (L, ≤) (see, e.g., Davey and Priestley [30]) is called a lattice if any two elements x and y have a greatest lower bound, denoted x ∧ y and called the meet (infimum) of x and y, as well as a smallest upper bound, denoted x ∨ y and called the join (supremum) of x and y. Note that x ≤ y if and only if x ∧ y = x if and only if x ∨ y = y.
A bounded lattice (L, ∧, ∨, 0, 1) is a lattice that has a bottom element 0 and a top element 1, i.e., 0 ≤ x ≤ 1 for any x ∈ L. A lattice (L, ∧, ∨) is called complete if any nonempty subset A of L has an infimum (i.e., greatest lower bound) and a supremum (i.e., smallest upper bound), denoted ⋀ A and ⋁ A, respectively. Any complete lattice is bounded.
The following properties of complete residuated lattices will be used in this paper without explicit indication (see, e.g., Bělohlávek [31] and Hájek [32]). For any a, b, c ∈ L and B ⊆ L, it holds that From here on, L always denotes a complete residuated lattice (L, ∧, ∨, * , →, 0, 1).
The operation * is also commonly called a triangular norm (t-norm, for short) and the operation → its residual implication. T-norms were originally introduced on the real unit interval [0, 1], but are readily extended to posets and lattices (see Refs. [33,34] for more details). A t-norm on a bounded lattice L is a binary operation * on L that is commutative (i.e., x * y = y * x, for any x, y ∈ L ) and associative (i.e., x * (y * z) = (x * y) * z, for any x, y, z ∈ L ), has neutral element 1 (i.e., x * 1 = x, for any x ∈ L ) and is orderpreserving (i.e., if x ≤ y, then x * z ≤ y * z, for any x, y, z ∈ L ). Additionally, in the case of a complete residuated lattice, a t-norm is supremum-preserving.

Binary Fuzzy Relations
The notion of an L-fuzzy relation on a set X generalizes the classical notion of a {0, 1}-relation by expressing degrees of relationship in some complete residuated lattice (L, ∧, ∨, * , →, 0, 1) [35]. A binary L-fuzzy relation (binary L-relation, for short) R on a set X is a mapping R ∶ X × X → L. Obviously, if L = {0, 1}, then binary relations are retrieved, often referred to as crisp relations.
A binary L-relation R 1 is said to be included in a binary L-relation for any x, y ∈ X. The intersection of two binary L-relations R 1 and R 2 on X is the binary L-relation R 1 ∩R 2 on X defined by R 1 ∩R 2 (x, y) = R 1 (x, y)∧R 2 (x, y), for any x, y ∈ X. Similarly, the union of two binary L-relations R 1 and R 2 on X is the binary L-relation R 1 ∪ R 2 on X defined by R 1 ∪ R 2 (x, y) = R 1 (x, y) ∨ R 2 (x, y), for any x, y ∈ X. The transpose R t of a binary L-relation R is the binary L-relation defined by R t (x, y) = R(y, x). The composition of two binary L-relations R 1 and R 2 on X is the binary L-relation R 1 •R 2 on X defined by:

Ternary Fuzzy Relations
A ternary (or triadic) L-fuzzy relation (ternary L-relation, for short) T on a set X is a mapping T ∶ X 3 → L. If L = {0, 1}, then ternary relations are retrieved. Inclusion, intersection and union are defined in a similar way as for binary L-relations. For more details on ternary (fuzzy) relations, we refer to Refs. [9,10,22,36].
A ternary L-relation T 1 is said to be included in a ternary L-relation T 2 , denoted T 1 ⊆ T 2 , if T 1 (x, y, z) ≤ T 2 (x, y, z), for any x, y, z ∈ X. The intersection of two ternary L-relations T 1 and T 2 on X is the ternary L-relation T 1 ∩ T 2 on X defined by T 1 ∩ T 2 (x, y, z) = T 1 (x, y, z)∧T 2 (x, y, z), for any x, y, z ∈ X. Similarly, the union of two ternary L-relations T 1 and T 2 on X is the ternary L-relation As in the crisp case [26], we define the ternary L-relations associated with a given ternary L-relation T on X obtained by permutation as follows: (i) The transpose of T is the ternary L-relation T t on X defined by T t (x, y, z) = T(z, y, x); (ii) The right-converse of T is the ternary L-relation T ⊣ on X defined by T ⊣ (x, y, z) = T(x, z, y); (iii) The left-converse of T is the ternary L-relation T ⊢ on X defined by T ⊢ (x, y, z) = T(y, x, z); (iv) The right-rotation of T is the ternary L-relation T + on X defined by T + (x, y, z) = T(z, x, y); (v) The left-rotation of T is the ternary L-relation T − on X defined by T − (x, y, z) = T(y, z, x).

COMPOSITIONS OF TERNARY FUZZY RELATIONS
In this section, we extend the types of composition of crisp ternary relations introduced by Bakri et al. [29] to the fuzzy setting, and investigate their properties. Definition 1. [29] Let T and S be two ternary relations on a set X. The • i -compositions of T and S, with i ∈ {1, … , 6}, are defined as: The following definition extends the above types of composition to the fuzzy setting.

Definition 2.
Let T and S be two ternary L-relations on a set X. The • i -compositions of T and S, with i ∈ {1, … , 6}, are defined by: T(x, s, t) * S(s, y, z).

Example 1.
Consider a bounded lattice L = {0, , , 1}, with and either being comparable (i.e., L is a chain) or incomparable (i.e., L is a diamond) and let * = ∧. Let X = {a, b, c, d} and consider the ternary L-relations T 1 and T 2 on X given by: One easily computes the • i -compositions of T 1 and T 2 , with i ∈ {1, … , 6}: Next, we investigate some properties of the above compositions.
First, the following proposition shows that the • i -composition is associative for any i ∈ {1, 2, 5, 6}. Proposition 1. Let T 1 , T 2 and T 3 be three ternary L -relations on a set X and i ∈ {1, 2, 5, 6}. Then it holds that Proof. Consider i = 1, the other cases being similar. Let (x, y, z) ∈ X 3 , then Since * is associative and supremum-preserving, it follows that In the following example, we show that the compositions • 3 and • 4 are not associative.

Example 2.
Let L(resp. T 1 , T 2 ) be the lattice (resp. the ternary L-relations on X = {a, b, c, d}) given in Example 1, * = ∧ and T 3 be the ternary L -relation on X given by: One easily verifies that Similarly, one can also verify that The following proposition lists the interaction of the compositions with inclusion and set-theoretical operations. The proof is straightforward. Proposition 2. Let T 1 , T 2 , S 1 , S 2 and S be ternary L-relations on a set X. For any i ∈ {1, … , 6}, the following statements hold: The following proposition lists the interaction of the compositions with the permutations. The proofs are again straightforward.

Proposition 3. Let T and S be two ternary L-relations on a set X.
The following equalities hold:

TRANSITIVITY OF TERNARY FUZZY RELATIONS
In this section, based on the compositions of ternary fuzzy relations, we introduce several types of transitivity of a ternary fuzzy relation and investigate their properties.

Definitions and Basic Properties
For a given binary L-relation R on a set X, the * -transitivity is defined as: for any x, y, z ∈ X. This property is equivalent to the condition that R•R ⊆ R, where • denotes the composition of binary L -relations. Analogously to the binary case, we introduce the types of transitivity of a ternary fuzzy relation based on the compositions of ternary fuzzy relations introduced above.
for any x, y, z, s, t ∈ X, it holds that T(x, s, t) * T(s, y, z) ≤ T(x, y, z).

Example 3.
Let L (resp. T 1 , T 2 ) be the lattice (resp. the ternary L-relations on X = {a, b, c, d} ) given in Example 1 and * be a t-norm on L. One easily verifies that Also, The following proposition discusses the transitivity of the transpose of a ternary relation.

Proposition 4. Let T be a ternary L-relation on a set X and i
The converse can be proved similarly.
The following proposition shows that transitivity is preserved under intersection.
Proposition 5. Let (T j ) j∈J be a family of ternary L-relations on a set X and i ∈ {1, … , 6}. It holds that the • i -transitivity of (T j ) j∈J implies the

Additional Properties
In this subsection, we discuss some additional properties of the types of transitivity of ternary fuzzy relations introduced above. More specifically, we investigate the interaction with the binary projections and the cylindrical extensions. To that end, we first introduce the binary projections of a ternary fuzzy relation and the cylindrical extensions of a binary fuzzy relation. They are immediate generalizations of the corresponding notions in the crisp case.

Definition 4.
Let T be a ternary L-relation on a set X.
(i) The left projection of T with respect to z ∈ X is the binary L-relation z T on X defined by z T(x, y) = T(z, x, y) ; (ii) The middle projection of T with respect to z ∈ X is the binary L-relation T z on X defined by (ii) The middle cylindrical extension of R is the ternary relation C m (R) on X defined by (iii) The right cylindrical extension of R is the ternary relation C r (R) on X defined by C r (R)(x, y, z) = R(x, y) .
Next, we express the projections of the compositions of ternary fuzzy relations in terms of the compositions of their binary projections. This proposition is a natural generalization of that in the crisp case [29].

T• 3 S P (T)•P r (S) P m (T)•P r (S) −
Similarly, the following proposition expresses the cylindrical extensions of the composition of binary fuzzy relations in terms of the compositions of their cylindrical extensions.

Proposition 7. Let R 1 and R 2 be two binary L-relations on a set X. The left, middle and right cylindrical extensions of the composition R 1 •R 2 are listed in the following table:
The following proposition expresses the relationship between the • i -transitivity corresponding to the associative compositions of a given ternary fuzzy relation and the *-transitivity of its binary projections.

Proposition 8. Let T be a ternary L-relation on a set X. The following implications hold:
(iii) If T is • 5 -transitive, then P m (T) is * -transitive; (iv) If T is • 6 -transitive, then P r (T) is * -transitive.
Proof. We only give the proof for the first implication, the other ones being similar. Suppose that T is • 1 -transitive, i.e., uT• 1 T ⊆ T. Hence, P (T• 1 T) ⊆ P (T). It is clear from Table 1 that P (T• 1 T) = P (T)•P (T). Hence, P (T)•P (T) ⊆ P (T). Thus, P (T) is *transitive.
The following proposition discusses the relationship between the *transitivity of a given binary fuzzy relation and the • i -transitivity corresponding to the associative compositions of its cylindrical extensions.

Proposition 9. Let R be a binary L-relation on a set X. The following equivalences hold:
(iv) R is * -transitive if and only if C r (R) is • 6 -transitive.
Proof. We only give the proof for the first equivalence, the other ones being similar. Suppose that R is * -transitive, i.e., R•R ⊆ R. Hence, C (R•R) ⊆ C (R). From Table 2, it is clear that Conversely, suppose that C (R) is • 1 -transitive, then it holds that C (R)• 1 C (R) ⊆ C (R). This implies that P (C (R)• 1 C (R)) ⊆ P (C (R)). From Table 1, we know that P (C (R)• 1 C (R)) = P (C (R))•P (C (R) and this guarantees that P (C (R))•P (C (R)) ⊆ P (C (R)). Since P (C (R)) = R, it follows that R•R ⊆ R. Thus, R is transitive. ☐

REPRESENTATION OF TRANSITIVE TERNARY FUZZY RELATIONS
The representability problem in the study of fuzzy relations has a long history. It was first addressed in the eighties [37,38] for binary fuzzy relations and is regularly taken up again [39,40]. It primarily deals with the representation of a transitive fuzzy relation in terms of a family of score functions. In this section, we provide related representation theorems for transitive (resp. reflexive and transitive) ternary fuzzy relations in terms of the binary projections and a related family of (score) functions.

Theorem 10. Let T be a ternary L-relation on a set X. The following equivalences hold: (i) T is • 1 -transitive if and only if there exists a family (f a ) a∈X of functions from X to L such that T a (x, y) ≤ f a (y), for any x, y, a ∈ X, and
for any x, y, z ∈ X; (ii) T is • 2 -transitive if and only if there exists a family (f a ) a∈X of functions from X to L such that T a (x, y) ≤ f a (x), for any x, y, a ∈ X, and for any x, y, z ∈ X; (iii) T is • 3 -transitive if and only if there exists a family (f a ) a∈X of functions from X to L such that T a (x, y) ≤ f a (y), for any x, y, a ∈ X, and for any x, y, z ∈ X; (iv) T is • 4 -transitive if and only if there exists a family (f a ) a∈X of functions from X to L such that T a (x, y) ≤ f a (x), for any x, y, a ∈ X, and for any x, y, z ∈ X; Comp. Cyl. ext.
for any x, y, z ∈ X.
Proof. We only give the proof for the first equivalence, the other ones being similar. First, for any x, y, z ∈ X we show that T(s, t, z) → T(s, t, a), for any a ∈ X. Note that f a (a) = 1.
On the one hand, for any x, y, z, a ∈ X, it holds that y, a)).
The property a * (a → b) ≤ b guarantees that T(x, y, a) = T a (x, y) .
Hence, by the adjointness property, it holds that T(x, y, z) ≤ f a (z) → T a (x, y). Thus, for any x, y, z ∈ X.
On the other hand, for any x, y, z ∈ X, it holds that ⋀ a∈X f a (z) → T a (x, y) Thus, for any x, y, z ∈ X.
Next, suppose that T is • 1 -transitive, i.e., for any x, y, a, s, t ∈ X, it holds that T(s, t, y) * T(x, y, a) ≤ T(s, t, a). By the adjointness property, it holds that T(x, y, a) ≤ T(s, t, y) → T(s, t, a). Hence,
Conversely, suppose that T a (x, y) ≤ f a (y), for any x, y, a ∈ X. Let x, y, z, s, t ∈ X, then taking into account that T(x, y, t) = ⋀ a∈X f a (t) → T a (x, y), it follows that The property a * (a → b) ≤ b guarantees that , y, z) .
☐ Similarly, we provide representation theorem for reflexive and transitive ternary fuzzy relations. We recall that a ternary fuzzy relation T on a set X is called reflexive if T(x, x, x) = 1, for any x ∈ X.
( a T(x, x) → a T(y, z)) , for any x, y, z ∈ X.
Proof. We only give the proof for the first equivalence, the other ones being similar. From Theorem 10, it follows that T is • 1transitive if and only if there exists a family (f a ) a∈X of functions from X to L such that T a (x, y) ≤ f a (y), for any x, y, a ∈ X and: for any x, y, z ∈ X. For the implication from left to right, it suffices to show that f a (z) = T a (z, z), for any a, z ∈ X, while it suffices to show that T is reflexive for the converse implication.
Let a, z ∈ X. On the one hand, since T a (x, y) ≤ f a (y), for any x, y, a ∈ X, it follows that T a (z, z) ≤ f a (z). On the other hand, T(s, t, a)) T(z, z, a).
The reflexivity of T guarantees that T(z, z, a) = T a (z, z) . , z) , for any a, z ∈ X.
Conversely, the reflexivity of T is obvious from the fact that: for any x ∈ X.
The following example illustrates the above representation theorem.

Example 4.
Let L = [0, 1] and T be the ternary L-relation on the set of real numbers ℝ given by: where ∶ ℝ → L is a decreasing mapping. One easily verifies that T is reflexive and • 1 -transitive for any t-norm * . According to Theorem 11, the ternary L-relation T can be represented as: for any x, y, z, a ∈ ℝ.

TRANSITIVE CLOSURES
In this section, we focus on the transitive closures of a ternary fuzzy relation with respect to the types of transitivity introduced above. We recall that the transitive closure of a ternary fuzzy relation is the smallest transitive ternary fuzzy relation that includes the given ternary fuzzy relation.

Transitive Closures of a Ternary Fuzzy Relation
In this subsection, we show that the • i -transitive closures of a ternary fuzzy relation can be written as the union of • i -powers of this ternary fuzzy relation. However, this only holds for the associative compositions. First, we discuss the existence of the • i -transitive closures of a given ternary fuzzy relation.
In general, for a given property P, the following theorem states the conditions under which the P-closure exists for all ternary fuzzy relations. This theorem is obtained in the same way as in Ref. [41] for binary fuzzy relations. Remark 1. One easily observes that any reflexive ternary L-relation T is included in its powers, i.e., for any n > 1 and any i ∈ {1, 2, 5, 6}.
In the following theorem, we characterize the • i -transitive closures of a ternary fuzzy relation, for any i ∈ {1, … , 6}.

(T) of T is given as
Tr cl it is easy to verify that T n,• i ⊆ (Tr cl Since Tr cl Conversely, to prove that Tr cl We only give the proof for i = 1, the other cases being similar. Let x, y, z, s, t ∈ X, then S(x, y, t) * S(s, t, z) = Since * is supremum-preserving, it follows that S(x, y, t) * S(s, t, z) = ⋃ m,n≥1 T n,• 1 (x, y, t) * T m,• 1 (s, t, z) .
By definition of the composition • 1 , it holds that Thus, S is • 1 -transitive. Since Tr cl ternary L-relation that includes T, it follows that Tr cl Therefore, Tr cl The following example illustrates the • i -transitive closures of a ternary fuzzy relation on a finite set, for any i ∈ {1, … , 6}.

Example 5.
Let L be the lattice given in Example 1, * = ∧ and T be the ternary L-relation on X = {a, b, c, d} given by: One easily computes the • 1 -powers of T: Thus, Tr cl In a similar way, the transitive closures of T corresponding to the other associative compositions can be written as a union of powers: For the nonassociative compositions, i.e., for i ∈ {3, 4}, one computes the smallest • i -transitive ternary relation containing T in an iterative manner without computing a union of powers. This leads to: {(a, b, a), (a, b, b), Note that in this case the union of the right powers would have successfully yielded the transitive closure, while the union of the left powers would have missed all triplets with degree of relationship ∧ .
Similary, one finds Tr cl In this case the union of the left powers would have successfully yielded the transitive closure, while the union of the right powers would have missed the triplet (d, d, b) with degree of relationship and the triplet (a, d, b) with degree of relationship ∧ . ⊲

Properties of Transitive Closures
In this subsection, we investigate various properties of the transitive closures of a ternary fuzzy relation. The following proposition expresses the transitive closures of ternary fuzzy relations obtained by permutation.

Proposition 15. Let T be a ternary L-relation on a set X. It holds that
(i) Tr cl (T)) + .

☐
The following proposition expresses the left, middle and right projections of the transitive closures of a ternary fuzzy relation.
Proof. We only prove the first equality, the other ones being similar. From Theorem 14, it follows that P (Tr cl (C m (R)) = C m (Tr cl (R)); (iii) Tr cl • 6 (C r (R)) = C r (Tr cl (R)).
Proof. We only prove the first equality, the other ones being similar. Since Tr cl (R) = ⋃ n≥1 R n , it follows that C (Tr cl (R)) = C ( ⋃ n≥1 R n ).

CONCLUSION
In this paper, we have extended the types of composition of ternary relations to the fuzzy setting. We have introduced several types of transitivity of a ternary fuzzy relation close in spirit to the *transitivity of a binary fuzzy relation. We have investigated their basic properties and their interaction with the binary projections of ternary fuzzy relations and cylindrical extensions of binary fuzzy relations. Also, we have provided representations of transitive (resp. reflexive and transitive) ternary fuzzy relations for the four types of transitivity corresponding to the associative compositions. Furthermore, we have studied the problem of closing a ternary fuzzy relation with respect to the proposed types of transitivity.
In future work, we intend to exploit the results obtained in this paper to study some important classes of ternary fuzzy relations, such as the fuzzy betweenness relations recently introduced by Zhang et al. [42] and ternary fuzzy equivalence relations.