Dynamical properties of logical substitutions

This is an expository paper on the dynamical properties of substitutions in propositional many-valued logics. We identify substitutions with endomorphisms of free algebras, and we study their actions on the dual spectral spaces.


Introduction
Everybody knows the classical truth-tables and uses them automatically. The classical propositional calculus studies the set of formulas that, when evaluated according to the truth-tables, always assume value 1. One proceeds as follows: (1) a formula is a polynomial built up from the propositional variables x i using the connectives ∧, ∨, →, ¬, 0, 1; (2) a valuation is a function p, distributing over the connectives, from the set of formulas to {0, 1}; (3) a formula r is true if p(r) = 1 for every valuation p; (4) a formula r is deducible if: (a) either is an element of a certain set Θ of basic axioms, (b) or there exists a formula s such that s and s → r are deducible, (c) or there exists a deducible formula s, propositional variables x 1 , . . . , x n , and formulas t 1 , . . . , t n , such that r results from s by substituting every x i that occurs in s with the corresponding t i ; (5) the completeness theorem holds: a formula is true iff it is deducible.
The completeness theorem relates a semantical notion "the statement r holds, regardless of the state of affairs p" with a computational notion "the statement r can be deduced from certain statements using certain rules". There are several computational procedures for which the completeness theorem holds: the ones sketched in (4) are known as substitutional Frege systems, and are the strongest -in terms of minimizing the number of steps required to prove a true statement-available proof systems [9]. The two rules (4b) of Modus Ponens and (4c) of substitution have different flavors. The first rule is, in some sense, statical: if something is known "locally", i.e., concerns certain propositional variables, then conclusions are drawn involving the same variables. On the other hand, the substitution rule adds dynamics to the picture: local knowledge can be moved around. This is of course just a vague heuristic, and in the course of these notes we will give a precise formal ground to it.
We will work at a level of generality broader than that of classical logic, enlarging the set of truth-values to include more than true and false; such logical systems are known as many-valued logics. Many-valued logic is an old discipline, going back to the twenties, and has recently been relived as a founding basis for fuzzy logic and fuzzy control; see [13], [8], [11] for detailed presentations and further references.
The key ideas of this work are the following: given a set of truth-values M ⊇ {0, 1}, we introduce on it an algebraic structure, determined by the choice of a truth-table for the conjunction connective. We then consider the class VM of all algebras that are generated by M in the sense of Universal Algebra, and we functorially associate a dual topological space to each object in VM . Algebraic endomorphisms of certain objects of VM (the so-called free algebras) correspond to applications of the substitution rule in deductions in the logic determined by M . Moreover, such endomorphisms give rise to continuous selfmappings of the dual topological spaces. Any set Θ ′ ⊇ Θ (Θ is a set of basic axioms as in (4a)) is associated to an open set O Θ ′ in the dual, and the deduction of new formulas from Θ ′ corresponds to taking the union of the backwards translates of O Θ ′ under the dynamics. Dynamical properties such as minimality or mixing have then logical consequences (see, e.g., Theorem 4.5, Theorem 4.8, and the discussion following Theorem 6.8). It is worth remarking that the trade between the logical and the dynamical side may be beneficial to both: as an example, we obtain in Theorem 5.6 an intrinsic characterization of the differential of a piecewise-linear mapping, a concept introduced in [26].
A rather delicate point in our approach is the determination of the level of generality one should allow. Here we must really strike a balance: the stronger is the system (i.e., the more restrictions we put on M ), the stronger are the results we obtain, and the more limited is the scope of the theory. The extreme case is in taking M = {0, 1}, in which everything boils down to the Stone Duality. On the other extreme, one might relax the assumptions on M to a bare minimum, even allowing cases in which the values 0 and 1 do not have a distinguished status: the only essential requirement seems to be that VM is a congruence-modular equational class. Of course, working at this level of generality requires a greater technical apparatus, and yields not easily visualizable results.
We stroke our balance by forcing M to be a subset of the real unit interval [0, 1], and by insisting that the conjunction connective meets some natural restrictions. In the few places where we might have wished more elbow-room, we have added some Addenda to provide references for further developments. These Addenda are meant for people having some knowledge of Universal Algebra and lattice-ordered abelian groups, and may be safely skipped by the other readers.

Many-valued logic
A t-norm is a continuous function ⋆ from [0, 1] 2 to [0, 1] such that ([0, 1], ⋆, 1) is a commutative monoid for which a ≤ b implies c ⋆ a ≤ c ⋆ b. We have a ⋆ 0 = 0 for every a, since a ≤ 1 implies 0 ⋆ a ≤ 0 ⋆ 1 = 0. Every t-norm induces a binary operation → on [0, 1] via Since ⋆ is continuous, the defining sup is really a max. We call → the implication (or the residuum) induced by ⋆. One checks easily that the usual lattice operations The idea underlying these definitions is that ⋆ is a function on truth-values representing a "conjunction" operator. Once a conjunction has been fixed, it is natural to define the truth-value of the implication a → b as the weakest value c such that the truth of the conjunction of a and c forces the truth of b. Note that "weakest" means "truest", i.e., nearest to 1: one should regard a more implausible assertion as a stronger one. The above interrelationship of ⋆ and → is usually expressed by saying that they constitute an adjoint pair.
This t-norm is usually called the Gödel-Dummett conjunction. (2) a ⋆ b = ab (i.e., the ordinary product of a and b). This is the product conjunction, and we have These are the Lukasiewicz conjunction, implication, and negation The above examples are in some sense exhaustive: by [20] every t-norm is obtainable as a combination of these three basic t-norms.
Fix a cardinal number κ, either finite or countable, and define the set of propositional variables to be {x i : i < κ} (then either κ = n and the propositional variables are x 0 , . . . , x n−1 , or κ = ω and the propositional variables are indexed by the natural numbers). Let F ORM κ be the smallest set containing all propositional variables having index < κ, the constants 0 and 1, and such that, if r, s ∈ F ORM κ , then (r⋆s), (r → s) ∈ F ORM κ . A formula is an element r of F ORM ω = n<ω F ORM n . We sometimes write r(x i1 , . . . , x in ) to signify that all propositional variables occurring in r are among x i1 , . . . , x in . We drop parentheses according to the usual conventions, and we write r ∧ s, r ∨ s, and ¬r as abbreviations for r ⋆ (r → s), (r → s) → s ∧ (s → r) → r , and r → 0, respectively. An algebra is a set A on which two binary operations ⋆ A , → A : A 2 → A and two elements 0 A , 1 A ∈ A have been fixed. Given a formula r(x 0 , . . . , x n−1 ) and elements a 0 , . . . , a n−1 ∈ A, we write r(a 0 , . . . , a n−1 ) for the element of A obtained by replacing every x i with the corresponding a i , and every operation symbol in r with its realization in A (the reader can easily supply a formal recursive definition). Given two formulas r(x 0 , . . . , x n−1 ) and s(x 0 , . . . , x n−1 ), we say that the identity r = s is true in A, and we write A |= r = s, if for every a 0 , . . . , a n−1 ∈ A the elements r(a 0 , . . . , a n−1 ) and s(a 0 , . . . , a n−1 ) are equal.
(1) Every singleton can be given the structure of an algebra in a unique trivial way; every identity is true in such an algebra.
Let A, B be algebras. A mapping ϕ : A → B is a homomorphism if it commutes with the connectives (i.e., ϕ(a ⋆ A b) = ϕ(a) ⋆ B ϕ(b), ϕ(0 A ) = 0 B , and so on; in the following we will drop the subscripts). A is [isomorphic to] a subalgebra of B if there exists an injective homomorphism from A to B. Let {A j : j ∈ J} be a family of algebras. The direct product of the family is the algebra whose base set is the cartesian product j A j , and in which the operations are defined componentwise; if all factors are equal, say to A, then we write A J . If ϕ : A → B is a homomorphism, then the epimorphic image ϕ[A] of A is a subalgebra of B.
Let A be a class of algebras; then HA (respectively, SA and PA) is the class of all epimorphic images (respectively, subalgebras and direct products) of algebras in A. Note that we always work up to isomorphism, so we tacitly close every class we consider under isomorphic images. Definition 2.3. A truth-value algebra is a subalgebra M of some algebra A of the form A = ([0, 1], ⋆, →, 0, 1), where ⋆ and → are a t-norm and its residuum.
Truth-value algebras are our basic building blocks.

Example 2.4.
(1) The set {0, 1} is always closed under the operations, regardless of the specific t-norm we choose. Moreover, all t-norms induce the same structure on {0, 1}, namely that of the two-element boolean algebra, which we denote by 2. For any class A of algebras, let VA be the equational class generated by A, i.e., the class of all algebras in which are true all identities true in all algebras of A. More explicitly, the algebra B is in VA iff, for every r, s ∈ F ORM ω , if A |= r = s for every A ∈ A, then B |= r = s. Garrett Birkhoff's completeness theorem [6,Theorem II.11.9] says that VA coincides with the class HSPA of all epimorphic images of subalgebras of products of algebras in A.
We will consider classes of algebras of the form VM = HSPM , where M is a truth-value algebra. We shall be concerned with two main cases: • Boole = V2. Elements of Boole are called boolean algebras; • if M = [0, 1] endowed with the Lukasiewicz connectives, then the elements of VM are called MV-algebras (MV stands for Many-Valued: the name is slightly misleading, since many-valued logic is not exhausted by Lukasiewicz logic, but it is firmly established; we accordingly write MV for the equational class VM ). A boolean algebra can be equivalently defined as a structure A = (A, ∧, ∨, ¬, 0, 1) such that x ∧ ¬x = 0; x ∨ ¬x = 1; ∧ and ∨ are commutative and mutually distributive.
Apart from the trivial change in the language (∨ replaces →), there is a theorem hidden in this equivalence, namely the fact that the above identities imply all other identities that hold in 2 [14, p. 5].
Proof. A structure (A, ∧, ∨, 0, 1) is a lattice with bottom and top iff it satisfies a certain finite set of identities (see, e.g., [6, p. 28]). Since M is totally-ordered, these identities are satisfied in M , and hence in A ∈ VM . The first equivalence in (ii) is just the definition of the lattice order on A. By definition of → in M , the identity (x 0 ∧ x 1 ) → x 1 = 1 is true in M , and hence in A. Therefore, if This proves (ii), and (iii) is then immediate. By Lemma 2.5(ii) we can deal with the "less than" relation between formulas, thus writing A |= r(x 0 , . . . , x n−1 ) ≤ s(x 0 , . . . , x n−1 ) for A |= r → s = 1; this just means that however we choose a 0 , . . . , a n−1 ∈ A we have r(a 0 , . . . , a n−1 ) ≤ s(a 0 , . . . , a n−1 ). We then say that r ≤ s is true in A.
Lemma 2.6. Under the same hypothesis as in Lemma 2.5, the following relations are true in A: Proof. One just checks that for every t-norm with residuum → the above relations are true in ([0, 1], ⋆, →, 0, 1). Hence they are true in M , and therefore in every algebra in VM .
Fix now κ and a truth-value algebra M . We want to construct an algebra A in VM satisfying the following properties: • A is generated by a family {a i : i < κ} of elements indexed by κ; • if r(x i1 , . . . , x in ) ∈ F ORM κ is not true in M , then the element r(a i1 , . . . , a in ) ∈ A is different from 1. Essentially, this means that the a i 's satisfy only those algebraic relations they cannot avoid, namely those that hold in M . Therefore they behave "as freely as possible", whence the name free algebra in VM over κ generators for A. Such an algebra is unique up to isomorphism, and can be characterized by an appropriate universal property: see, e.g., [6,II §10]. We write Free κ (VM ) for A, and we construct it as follows: consider first M κ , and let a i : M κ → M be the i-th projection. The a i 's are elements of the algebra M (M κ ) , and we define Free κ (VM ) to be the subalgebra of M (M κ ) generated by them; the first condition is then automatically met. Suppose M |= r; then there exist elements b i1 , . . . , b in ∈ M such that r(b i1 , . . . , b in ) = 1. Choose an element c ∈ M κ such that a i (c) = b i for every i ∈ {i 1 , . . . , i n }. Then the projection of r(a i1 , . . . , a in ) ∈ M (M κ ) onto the c-th component has value r(a i1 (c), . . . , a in (c)) = r(b i1 , . . . , b in ) = 1: therefore r(a i1 , . . . , a in ) is different from 1 in M (M κ ) , and hence in Free κ (VM ).
Example 2.7. Although the above construction looks baroque, it really works trivially. Suppose, e.g., we want to construct Free 3 Boole. We first construct 2 3 , which contains the eight elements c 1 = (0, 0, 0), c 2 = (0, 0, 1), . . . , c 8 = (1, 1, 1). Then we construct 2 (2 3 ) , which contains 2 8 elements; three of these elements, namely a 1 = (0, 0, 0, 0, 1, 1, 1, 1), a 2 = (0, 0, 1, 1, 0, 0, 1, 1), a 3 = (0, 1, 0, 1, 0, 1, 0, 1), correspond to the canonical projections to the first, second, and third component of the c j 's (of course, the above explicit form for the a i 's depends on how we listed the c j 's). It is clear that if r(x 1 , x 2 , x 3 ) is not 1 in 2 for some choice of elements, then r(a 1 , a 2 , a 3 ) = 1 = (1, 1, 1, 1, 1, 1, 1, 1) in Free 3 (Boole): we just tried all possible choices! Often it is not trivial to determine, for a given M and κ, which are the elements of Free κ (VM ), i.e., which functions from M κ to M are expressible as polynomials over the projections a i . The case that most concerns us is the Lukasiewicz one, which we will treat in Theorem 5.1. For the classical logic case, the answer is the following: give 2 the discrete topology, and 2 κ the product topology. Then: (i) an element f ∈ 2 (2 κ ) is in Free κ (Boole) iff it is continuous as a function f : 2 κ → 2. Since continuous functions from a topological space X to 2 correspond to clopen subsets of X, this amounts to saying that the clopen subsets of 2 κ are exactly the boolean combinations of the sets of the form a −1 With this hint, we leave the proof of (i) as an exercise for the reader. As a corollary we obtain: (ii) if κ = n is finite, then 2 n is a discrete space, and all functions : 2 n → 2 are in Free n (Boole), i.e., are expressible by n-variable formulas. This is sometimes called the functional completeness of the boolean connectives; (iii) if κ = ω is countably infinite, then Free ω (Boole) is the boolean algebra of all clopen subsets of the Cantor space 2 ω , the latter being the only compact, totally disconnected, second countable space having no isolated points [16, §2.15].

Spectral spaces
In the preceding section we have defined the equational class VM generated by a truth-value algebra M , and described the algebras Free κ (VM ). In this section we functorially associate a dual topological space to each algebra in VM ; the duals of the free algebras are our main object of study.
We fix a truth-value algebra M ; all algebras we consider are elements of VM . A filter on A ∈ VM is the counterimage of 1 under some homomorphism of domain A: sometimes filters are called dual ideals since ideals, as in ring theory, are counterimages of 0.
Conversely, assume that f is a subset of A containing 1 and closed under Modus Ponens. Then f is upwards closed, since a ≤ b implies a → b = 1 ∈ f, and hence a ∈ f implies b ∈ f. If a ∈ f, then b → (a ⋆ b) ∈ f (by Lemma 2.6(ii)); hence, if b ∈ f as well, then a ⋆ b, a ∧ b ∈ f (by Lemma 2.6(i)). Let now f be a subset of A containing 1 and closed under MP. Define a relation ∼ on A by a ∼ b iff a → b, b → a ∈ f. Then ∼ is an equivalence relation (transitivity follows from Lemma 2.6(iii)) which respects the operations. Indeed, if a ∼ b and c ∼ d, then a ⋆ c ∼ b ⋆ d (by Lemma 2.6(iv)) and a → c ∼ b → d (by Lemma 2.6(v)). We can then form the quotient algebra A/f in the natural way. If a/f denotes the equivalence class of a w.r.t. ∼, then the map ρ(a) = a/f is a surjective homomorphism from A to A/f. It is then straightforward to check that the map τ : is an isomorphism. Since ϕ = τ • ρ, our last claim follows by composing isomorphisms.
A filter p is prime if it is proper (i.e., different from A) and for every two filters f, g, if p = f ∩ g then either p = f or p = g. A filter is maximal if it is proper and not properly contained in any proper filter; clearly every maximal filter is prime. Although not difficult, the proof of the following lemma requires some knowledge of Universal Algebra; the reader can find a proof in [24, Proposition 1.3].
Lemma 3.2. The following are equivalent: (1) p is prime; (2) A/p is totally-ordered; (3) p = ϕ −1 [1], for some homomorphism ϕ from A to a totally-ordered algebra; (4) the set of filters ⊇ p is totally-ordered by inclusion; Note that the only totally-ordered boolean algebra is 2 (if a belongs to the totally-ordered boolean algebra A, then either a ≤ ¬a or ¬a ≤ a, hence either a → ¬a = 1 or ¬a → a = 1; in the first case a = 0, and in the second a = 1), and therefore prime filters coincide with maximal ones. This simple fact distinguishes in a crucial way boolean algebras from MV-algebras and other algebras related to many-valued logics, as we will see later. The mapping A → Spec A is functorial. Indeed, let ϕ : A → B be any homomorphism, and define ϕ * : , and hence ϕ * is continuous. Moreover, (ψ • ϕ) * = ϕ * • ψ * , so Spec is a contravariant functor from VM (viewed as a category with the homomorphisms as arrows) to the category of topological spaces and continuous mappings. (i) The open sets in Spec A are in 1-1 correspondence with the filters of A, and this correspondence is an isomorphism w.r.t. the ⊆ relation. The defining subbasis is intersection-closed, and an open set is compact iff it is of the form O a . Spec A is second countable iff A is countable. (iii) Spec A is T 0 , compact, and every closed irreducible set is the closure of a point.

Proof.
The key point is that every filter f is the intersection of all prime filters ⊇ f; this fact follows from a standard application of the Zorn Lemma. As a consequence, for every D ⊆ A, the intersection of all filters containing D coincides with the intersection of all prime filters containing D. This intersection, namely F D , is the smallest filter containing D, and we denote it by f(D). One verifies easily that f(D) is the set of all a ∈ A such that there exist a 1 , . . . , a r ∈ D satisfying a ≥ a 1 ⋆ · · · ⋆ a r . Consider the mappings They both reverse the ⊆ relation. Their composition gives, on the left side, the mapping D → F D = f(D) that associates to a set the filter it generates, and on the right side the topological closure mapping P → F P (Proof: p belongs to the . As a consequence, they induce an antiisomorphism between the lattice of filters of A and the lattice of closed sets of Spec A; this proves (i).
We leave (ii) as an exercise, and prove (iii). The T 0 property is clear, because the closure of p is F {p} = F p = {q : q ⊇ p}. Compactness follows from (ii) and the fact that Spec A = O 0 . Let F f be a closed irreducible set, i.e., a closed set that cannot be expressed nontrivially as the union of two closed sets; we must show that A spectral space is a topological space in which the compact open sets form a basis closed under finite intersections, and such that the conditions in Theorem 3.4(iii) hold. By [15], these are exactly the prime ideal spaces of commutative rings with 1.
The spectral spaces of boolean algebras have a further property: the compact open sets are exactly the clopen sets (i.e., the sets which are both closed and open). Indeed, as we observed after Lemma 3.2, if A ∈ Boole then every p ∈ Spec A is of the form p = ϕ −1 [1] for some homomorphism ϕ : A → 2. This immediately implies that a ∈ p iff ¬a / ∈ p, i.e., F a = O ¬a . Therefore the O a 's are clopen, and since every clopen is compact, there are no other clopens. Thus A is in bijection with the clopen sets of X = Spec A via a → F a , and since F a∧b = F a ∩ F b , F ¬a = X \ F a , F 0 = ∅, and F 1 = X, this bijection is a boolean algebra isomorphism. We have thus proved the Stone Representation Theorem [14, §18]: every boolean algebra is isomorphic to the algebra of clopen subsets of its spectrum.
Addendum 3.5. Spectral spaces can be functorially introduced in any congruencemodular equational class. In general, filters should be substituted by congruences (unless the class turns out to be ideal-determined [12]), and one introduces the notion of prime congruence by using the commutator product; the construction carries on smoothly [1]. The main trouble is with Theorem 3.4(i): the open sets of Spec A will now be in 1-1 correspondence only with the radical congruences of A, i.e., those congruences Φ such that, for every congruence Ψ, if Φ contains the commutator product of Ψ with itself, then Φ already contains Ψ (the spectrum of Z as a commutative ring is a typical example, the radical ideals being those generated by a squarefree integer). In our case there are no such problems, since equational classes are generated by truth-value algebras, in which a lattice structure is termdefinable. All our classes are therefore congruence-distributive, and all congruences are radical.

Proofs and dynamics
We can now make precise the heuristic in the Introduction about the dynamics in Frege proof systems.
A substitution on F ORM κ is any mapping σ : F ORM κ → F ORM κ which distributes over the connectives (i.e., σ(0) = 0, σ(1) = 1, and σ(r • s) = σ(r) • σ(s), for • ∈ {⋆, →}). A substitution is therefore determined by an arbitrary assignment of formulas to propositional variables. Note that all variables must be substituted at the same time: e.g., if r = x 1 → x 2 , σ(x 1 ) = x 3 ⋆ x 2 , and σ(x 2 ) = x 1 , then Given a formula r and a set of formulas Θ, a deduction of r from Θ is a finite sequence of formulas r 1 , . . . , r h such that r h = r and for every 1 ≤ j ≤ h we have: (a) either r j ∈ Θ; (b) or there exist 1 ≤ k, m < j such that r m has the form r k → r j (we then say that r j follows from r k and r k → r j via Modus Ponens); (c) or there exists 1 ≤ k < j and a substitution σ such that r j = σ(r k ). An MP-deduction is a deduction in which the substitution rule (c) is never applied. For a fixed truth-value algebra M , it is often possible -although sometimes difficult-to find effectively a set of formulas Θ such that the formulas deducible from Θ are exactly the formulas which are true in M . If this happens, then we say that Θ provides an axiomatization of VM .
All of them -except perhaps the last one-have rather transparent meanings: the first one expresses transitivity of implication, the third is ex falso quodlibet, the fourth expresses commutativity of conjunction, and so on. We have [13]: Fix a truth-value algebra M and a cardinal κ. Let Θ κ be the set of all formulas in F ORM κ which are true in M . Hence r(x i1 , . . . , x in ) ∈ Θ κ iff r(a i1 , . . . , a in ) = 1 in Free κ (VM ), where the a i 's are the free generators. It is a customary abuse of notation to write x i for a i , so the symbol r may denote either an element of F ORM κ or an element of Free κ (VM ). This slight ambiguity is really sought for: it is exactly the ambiguity that results in working modulo Θ κ , or in identifying a formula with the function it induces on truth-values. Formally stated: The set Θ ω is closed under Modus Ponens and substitution, so nothing new can be deduced from it. We let now ∆ be any set of formulas, and raise two questions: (1) What can be deduced from Θ ω ∪ ∆?
(2) Which substitutions are needed for such a deduction?
If r is deducible from Θ ω ∪ ∆, then there is a deduction involving only variables already appearing in {r} ∪ ∆.
Proof. By renaming variables we may assume that the variables appearing in {r}∪∆ are exactly those variables with index < κ, for a certain κ. Let a deduction of r from Θ ω ∪ ∆ be given. By a standard argument [7, p. 149], we may transform the given deduction into an MP-deduction r 1 , . . . , r h = r of r from Θ ω ∪ {σ(t) : σ is a substitution and t ∈ ∆}. Let τ be the substitution given by τ (x j ) = x j if j < κ, and τ (x j ) = 1 otherwise. Then τ (r 1 ), . . . , τ (r h ) = r is an MP-deduction of r from Θ κ ∪ {σ(t) : σ is a substitution, t ∈ ∆, and σ(t) ∈ F ORM κ }, and hence a deduction of r from Θ κ ∪ ∆ in which all formulas and all substitutions involve only variables with index < κ.
Identifying F ORM κ with Free κ (VM ), a substitution is nothing more than an endomorphism of Free κ (VM ) (i.e., a homomorphism from Free κ (VM ) to itself). The freeness of the generators says that however we choose elements {b i : i < κ} in Free κ (VM ) there is precisely one endomorphism that maps x i to b i . If (Π, O) = X κ for every O = ∅, then we say that Π acts minimally on X κ : this is equivalent to saying that every point of X κ has a dense orbit under Π.
Proof. (i) follows from Theorem 3.4(i) and the proof of Lemma 4.2: r can be MPdeduced from Θ ω ∪ ∆ iff r can be MP-deduced from Θ κ ∪ ∆ iff r belongs to the We prove (iii): assume that r can be deduced from Θ ω ∪ ∆. By Lemma 4.2, there exists a deduction r 1 , . . . , r h = r such that every r j is in Θ κ ∪ ∆ and all substitutions applied are in Σ κ . Working by induction on h we assume that ∈ O s→t , then s, s → t ∈ p. Since filters are closed under MP, we have t ∈ p and p / ∈ O t . Therefore, if r h has been obtained via MP, then the induction hypothesis We leave the reverse implication as an exercise for the reader (Hint: O r is compact).
We say that Θ ⊆ F ORM ω is equationally complete if, however we choose r, s ∈ F ORM ω with r / ∈ Θ, the formula s is deducible from Θ ∪ {r}.
Proof. Let O be a nonvoid open subset of X ω , and assume that Θ ω is equationally complete: we want to show that (Σ ω , O) = X ω . Let r ∈ Free ω (VM ) be such that ∅ = O r ⊆ O; we then have r / ∈ Θ ω . By assumption, the formula 0 is deducible from Θ ω ∪ {r}, and hence we get The same argument yields the reverse implication.
Addendum 4.6. The equational completeness of Θ ω amounts to the lack of nontrivial equational subclasses of VM . Among classes generated by truth-value algebras, the only one fulfilling this property is Boole (easy proof, resting on the fact that 2 is a subalgebra of any M ). Theorem 4.5 then implies that Σ ω acts minimally on X ω only in the case of boolean algebras. There are other cases in which an algebra M (not a truth-value algebra in our sense) generates a congruence-distributive equational class having no nontrivial subclasses. A particularly interesting case is when M is the set of integers equipped with its natural structure (Z, +, −, 0, ∨, ∧) of lattice-ordered group [5], [2]. The resulting equational class is the class of all lattice-ordered groups, and the above properties are fulfilled. Theorem 4.5 says then that the endomorphisms of the free lattice-ordered groups act minimally on the relative spectra: see [23] for a description of such spaces.
For every p = (. . . , p i , . . .) ∈ M κ , the evaluation mapping at p, given by r(x i1 , . . . , x in ) → r(p i1 , . . . , p in ), is a homomorphisms ϕ : Free κ (VM ) → M . Since M is totally-ordered, the kernel ϕ −1 [1] is a prime filter p, hence an element of X κ . We thus get a mapping p → p from M κ to X κ , which we denote by π. The map π has dense range (∅ = O r ⇒ r / ∈ Θ κ ⇒ ∃p ∈ M κ r(p) = 1 ⇒ ∃p r / ∈ π(p) ⇒ ∃p π(p) ∈ O r ), but it is not necessarily continuous; it is continuous in the two cases that most concern us, namely in classical logic (see Lemma 4.7) and in Lukasiewicz logic (see the next section). Let commutes. As π has dense range, S determines the continuous function σ * . We call σ * the dual of σ, and S the mapping on truth-values induced by σ.
Proof. Recall from the end of Section 2 that Free κ (Boole) is the boolean algebra of all clopen subsets of 2 κ , where the latter space is given the product topology. If p and q are distinct points of 2 κ , then there exists a clopen set C containing p and not containing q. Hence C ∈ π(p) \ π(q) and π is injective (as usual, we are identifying clopen subsets with their characteristic functions). Let p ∈ X κ . Since p is a proper filter, ∅ / ∈ p and in particular the intersection of any finite family of elements of p is nonempty. By compactness, p contains a point p ∈ 2 κ . Since C ∈ p implies p ∈ C, we have p ⊆ π(p). But in a boolean algebra every prime filter is maximal, and hence p = π(p). So π is a bijection. Both in 2 κ and in X κ the clopen sets generate the topology; moreover, as shown before Addendum 3.5, the mapping C → F C is a bijection between the two families of clopen sets. Since p ∈ C iff C ∈ π(p) iff π(p) ∈ F C , the map π is a homeomorphism.
Given a point p and a nonvoid open subset O of the Cantor space 2 ω , one easily constructs a homeomorphism S : 2 ω → 2 ω such that S(p) ∈ O (if p = (p 0 , p 1 , . . .) and [a 0 , . . . , a n ] = {q ∈ 2 ω : q i = a i for i = 0, . . . , n} is a block contained in O, then the mapping that exchanges 0 with 1 in those indices i for which p i = a i is such a homeomorphism). Hence not only Σ ω , but even Ξ ω acts minimally on Spec Free ω (Boole).
Of course we can do better than that, because there exist many minimal homeomorphisms of the Cantor space. The simplest example is obtained by identifying 2 ω with the topological group of 2-adic integers Z 2 , and letting S be the translation by 1: S(p) = p + 1. Let us compute the substitution σ on Free ω (Boole) for which S = σ * . If x i is the i-th free generator, then F xi = {p ∈ 2 ω : p i = 1}, and Since addition in Z 2 is just addition in base 2 with carry, we have that p ∈ F σ(xi) iff • either p i = 1 and p j = 0 for some j < i; • or p i = 0 and p j = 1 for every j < i. Therefore Consider the following formulas: (△ is the boolean symmetric difference: a△b = (a ∧ ¬b) ∨ (¬a ∧ b)). Then F σ(xi) = F si by the isomorphism cited before Addendum 3.5. The required substitution is therefore the one defined by σ(x i ) = s i . From the point of view of proof systems, we have thus obtained the following result.
Theorem 4.8. From the set of boolean tautologies plus any given non-tautology we can derive every formula using only Modus Ponens and the substitution σ given above.

Lukasiewicz logic
In the rest of this paper we will concentrate on Lukasiewicz logic; we therefore fix M = [0, 1] endowed with the connectives in Example 2.1(3). A key distinguishing feature of the Lukasiewicz connectives is their continuity with respect to the standard topology of [0, 1]. As a matter of fact Lukasiewicz logic is the only t-norm based logic in which all connectives are continuous [19].
A [rational] cellular complex over M n = [0, 1] n is a finite set W of cells (i.e., compact convex polyhedrons), whose union is [0, 1] n , and such that: (1) every vertex of every cell of W has rational coordinates; (2) if C ∈ W and D is a face of C, then D ∈ W ; (3) every two cells intersect in a common face.
A McNaughton function is a continuous function f : [0, 1] n → [0, 1] for which there exists a complex as above and affine linear functions with integer coefficients F j (x) = a 1 j x 1 + · · · + a n j x n + a n+1 j , in 1-1 correspondence with the n-dimensional cells C j of the complex, such that f ↾ C j = F j for each j. Here are typical McNaughton functions, for n = 1 and n = 2: they are induced by the formulas Given a substitution σ : Free n (MV ) → Free n (MV ), to each function s i = σ(x i ) there corresponds a cellular complex W i such that s i is affine linear on each cell of W i . Let W be a complex that is a common refinement of W 0 , . . . , W n−1 . Then on each cell C j of W the function S : [0, 1] n → [0, 1] n defined before Lemma 4.7 is given by where A j is an n×n matrix and B j a column vector, both having integer coefficients. Conversely, every continuous selfmapping S of [0, 1] n which is piecewise affine linear with integer coefficients (i.e., is locally expressible in the form ( * * ), using finitely many (1) S(p i ) = p i+1 (mod 3) , and S(p ′ i ) = p ′ i+1 (mod 3) ; (2) every other vertex is fixed; (3) S is affine linear on each cell. In short, the first complex is mapped onto the second by "rotating counterclockwise" the two inner triangles, and distorting accordingly the border triangles. As a matter of fact, S is topologically conjugate to the union of two twists [25, §5]. The data above determine the matrix A j and the column vector B j on each triangle C j . One checks directly that all these matrices and vectors have integer entries; hence S is a McNaughton homeomorphism. In doing computations, it is expedient to write p = (p 0 , . . . , p n−1 ) ∈ [0, 1] n using projective coordinates (a 0 : . . . : a n ) ∼ (p 0 : . . . If S is induced by σ, then the action of S on [0, 1] n is just the surface of the action of the full dual σ * on X n . Indeed, as proved in [21,Proposition 8.1], in the case of Lukasiewicz logic the map π in the diagram ( * ) is a homeomorphic embedding of [0, 1] n onto the subspace of maximal filters.
By Lemma 3.2, the points of X n (indeed, of any spectrum) form a forest under the specialization order: p ≤ q iff q is in the closure of {p} iff p ⊆ q (a forest, sometimes called a root system, is a poset in which the elements greater than any given element form a chain). Example 5.3. A full description of X n is given in [23]. Since it is rather involved, here we limit ourselves to the cases n = 1 and n = 2.
Assume n = 1. If p ∈ (0, 1) is rational, then there are two incomparable prime filters π(p) + and π(p) − properly contained in the maximal π(p). Namely, π(p) − is the filter of all McNaughton functions : [0, 1] → [0, 1] that are 1 in a left neighborhood of p, and analogously for π(p) + w.r.t. right neighborhoods. The only prime filter contained in π(0) (respectively, in π(1)) is π(0) + (respectively, π(1) − ). If p is irrational, then π(p) is minimal in the specialization order. Now assume n = 2, p = (p 0 , p 1 ) ∈ (0, 1) 2 . If p 0 , p 1 , 1 are linearly independent over Q, then π(p) is a minimal -as well as maximal-prime filter. If p 0 , p 1 , 1 satisfy exactly one (up to scalar multiples) nontrivial linear dependence over Q, then there are two incomparable prime filters below π(p), and both of them are minimal. Otherwise, consider the unit circle S 1 in the tangent space to p. For every u ∈ S 1 there is a prime filter p u contained in π(p). If the line in the tangent space connecting the origin with u does not hit any point with rational coordinates, then p u is minimal. Otherwise, p u contains two minimal prime filters p + u and p − u . For p along the border of the unit square, this description gets modified in the obvious way. The following picture may clarify the situation: Addendum 5.4. Let n (not necessarily n = 1, 2) be given, p ∈ X n . Let p = p 0 ⊂ p 1 ⊂ · · · ⊂ p t be the chain, of length t, of elements above p in the specialization order. Given an endomorphism σ of Free n (MV ), we have and hence the MV-algebra Free n (MV )/σ * (p) is a subalgebra of Free n (MV )/p. By [23, Theorem 4.7(i) and Corollary 4.9], this implies that the length of the chain above σ * (p) is less than or equal to t.
Since [0, 1] n is dense in X n , in principle we might reduce the study of σ * to the study of S. However, taking into consideration the action of σ * on the full spectrum gives us deeper insight. For example, it is possible to provide an intrinsic (i.e., coordinate-free) characterization of the differentials T p S of a McNaughton mapping S. Differentials of piecewise-linear maps have been constructed by Tsujii in [26]; we show here how Tsujii's construction can be intrinsically described in purely algebraic terms.
It may be helpful for the reader to recall the coordinate-free description of the differentials of a morphism S : X → Y of differentiable varieties. Let p be a point of X, q = S(p), O p and O q the rings of germs of differentiable functions at p and q, respectively. O p and O q are local rings: let m and n be the respective maximal ideals (i.e., m = {f ∈ O p : f (p) = 0}, and analogously for n). The mapping σ : O q → O p defined by σ(g) = g • S is a well-defined ring homomorphism, and σ[n] ⊆ m. Therefore, σ induces a vector space homomorphism from n/n 2 to m/m 2 , which we denote byσ. The tangent spaces T p X and T q Y are canonically isomorphic to the dual vector spaces (m/m 2 ) ′ and (n/n 2 ) ′ , respectively, and under these isomorphisms the differential T p S corresponds to the dual mappingσ ′ : (m/m 2 ) ′ → (n/n 2 ) ′ . Explicitly, if T p X ∋ v : m/m 2 → R is a tangent vector at p, then (T p S)(v) is the tangent vector at q defined by [(T p S)(v)](g/n 2 ) = (v •σ)(g/n 2 ) = v((g • S)/m 2 ).
We will develop an analogous description for piecewise-linear maps. Before doing so, we need a few more preliminaries; see [5], [2] for more details and unproved claims. A lattice-ordered abelian group (ℓ-group for short) is a structure (G, +, −, 0, ∧, ∨) such that (G, +, −, 0) is an abelian group, (G, ∧, ∨) is a lattice, and + distributes over the lattice operations. ℓ-homomorphisms of ℓ-groups are groups homomorphisms that are also lattice homomorphisms. The class of all ℓ-groups is equational and, as such, contains free objects. The free ℓ-group over n generators, Fℓ(n), is the ℓ-group (under pointwise operations) of all functions g : R n → R that are continuous and piecewise-linear with integer coefficients (i.e., there exist finitely many homogeneous linear polynomials g 1 , . . . , g m ∈ Z[x 1 , . . . , x n ] such that, for every w ∈ R n , g(w) = g j (w) for some 1 ≤ j ≤ m). The set ℓ-Hom(Fℓ(n), R) of all ℓ-homomorphisms from Fℓ(n) to R is in 1-1 correspondence with R n , via the map that associates to w ∈ R n the evaluation mapping ϕ w : g → g(w). A strong unit of the ℓ-group G is an element 0 ≤ u ∈ G such that, for every g ∈ G, g ≤ nu for some positive integer n. If u is a strong unit of G, then the interval [0, u] = {g ∈ G : 0 ≤ g ≤ u} can be given the structure of an MV-algebra Γ(G, u) = ([0, u], ⊕, ¬, 0, 1) by setting g ⊕ h = (g + h) ∧ u, ¬g = u − g, 0 = 0 G , 1 = u. The mapping (G, u) → Γ(G, u) is functorial, and determines a categorical equivalence between the category of ℓ-groups with strong unit and the category of MV-algebras [21]. In particular, the filters of Γ(G, u) are in natural 1-1 correspondence with the kernels of ℓ-homomorphisms of domain G.
The preliminaries being over, let S : [0, 1] n → [0, 1] n be a McNaughton mapping, p ∈ [0, 1] n , q = S(p). Then m = π(p) and n = π(q) are maximal filters of Free n (MV ). Given p ∈ X n , the germinal filter corresponding to p is the filter g p = {q ∈ X n : q ⊆ p}. By [5, Proposition 10.5.3 and Definition 10.5.6], and using the properties of the Γ functor, the quotient A p = Free n (MV )/g m is the MV-algebra of germs at p of McNaughton functions; analogously for A q = Free n (MV )/g n . The MV-algebra A p is local, i.e., has a unique maximal filter m/g m . Let σ be the endomorphism of Free n (MV ) that induces S. Proof. By the commutativity of the diagram ( * ), σ −1 [m] = σ * (m) = n, so the first statement is immediate. Let p be a prime filter below m in the specialization order. Since σ * is continuous and m is in the closure of {p}, the maximal filter n = σ * (m) must be in the closure of {σ * (p)}. Therefore σ * (p) is below n, hence g n ⊆ σ * (p) = σ −1 [p] and σ[g n ] ⊆ p.
Proof. For simplicity's sake, we assume that p and q = S(p) have rational coordinates and are in the topological interior of the n-cube: we will discuss in Addendum 5.7 how these assumptions can be discarded. Write q in projective coordinates (a 0 : . . . : a n ), with a n > 0, and let Q = (a 0 , . . . , a n ) ∈ R n+1 . Let N be the kernel of ϕ Q , and let G N be the germinal kernel associated to N [5, Proposition 10.5.3]. Since q has rational coordinates, Q has rank 1 according to [23, p. 188]. By [23,Theorem 4.8], the quotient N/G N is an ℓ-group, which is ℓ-isomorphic to Fℓ(n) under the map D Q defined in [23,Definition 2.2]. By the properties of the Γ functor, the ℓ-groups n/g n and N/G N are ℓ-isomorphic as well. We therefore obtain an ℓ-isomorphism D q : n/g n → Fℓ(n) which, by explicit computation, has the form We have of course an analogous ℓ-isomorphism D p : m/g m → Fℓ(n). Let D p S denote the Tsujii differential of S at p, and let v ∈ R n . Since S is continuous and defined everywhere on [0, 1] n , the definition in [26,Eq. (13)] simplifies to this amounts to the commutativity of the diagram Choose r/g n ∈ n/g n . As remarked in [26, p. 358 as required.
Addendum 5.7. In the proof of Theorem 5.6 we assumed that p and q have rational coordinates and are in the topological interior of [0, 1] n . The first assumption is motivated by the fact that, by definition, McNaughton mappings have integer coefficients. This implies that the only tangent vectors, say at q, that can be algebraically recognized are those in the R-span V of the set of all v ∈ R n such that the affine line through q and q + v is the intersection of affine hyperspaces having integer (equivalently, rational) coefficients. The ℓ-group n/g n is then ℓ-isomorphic to Fℓ(k), for k = dim(V ) ≤ n, and the algebraic tangent space (n/g n ) ′ is isomorphic to R k . According to the personal interests, one may either accept these underdimensional tangent spaces, or treat them drastically, by tensoring everything with R. This means considering piecewise-linear functions with arbitrary real coefficients, so dropping the assumption that the cellular complexes involved have rational vertices, and passing from ℓ-groups and MV-algebras to real vector lattices [3] and their Γ images. All quotients n/g n are then isomorphic to the free vector lattice over n generators FVL(n) [23,Theorem 3.8]. The dual of FVL(n), i.e., the set of all R-linear ℓ-homomorphisms from FVL(n) to R is still in bijection with R n via the evaluation mapping, and all dimensionality problems disappear. About the other assumption: if p or q (say p) is on the boundary of [0, 1] n , then the quotient m/g m is ℓ-isomorphic not to Fℓ(n), but to a quotient of Fℓ(n) by a principal kernel or, equivalently, to the ℓ-group of restrictions of the elements of Fℓ(n) to a polyhedral cone W . The dual (m/g m ) ′ is then in bijection with W , in agreement with [26,Eq. (14)], and the proof of Theorem 5.6 carries on.

Chaotic actions
Let p = (. . . , p i , . . .) ∈ [0, 1] κ . We say that p has finite denominator if all p i 's are rational numbers, and there exists 0 < d ∈ Z such that dp ∈ Z κ . The least such d is the denominator of p, written den(p).
In the following we will tacitly identify via π the κ-cube [0, 1] κ with the subspace of X κ whose elements are the maximal filters. Corollary 6.2. Let Rat n be the set of rational points in [0, 1] n . Then Rat n is a dense subset both of [0, 1] n and of X n . All the elements of Rat n have a finite Σ n -orbit. No point of X ω has a finite Σ ω -orbit.
Proof. Rat n coincides with the set of points in [0, 1] n having finite denominator, and is dense in [0, 1] n . As the n-cube is dense in X n , Rat n is dense in X n as well. If p ∈ Rat n , then by Lemma 6.1 the Σ n -orbit of p is the set of points whose denominator divides den(p), and this set is finite. Since the submonoid of Σ ω whose elements are all the substitutions σ such that σ(x i ) ∈ {0, 1} has the cardinality of the continuum, our last claim is immediate. By Lemma 6.1(i) Σ κ does not act minimally on X κ . We are therefore lead to weaken the requirement of minimality to that of topological transitivity: we say that Π ⊆ Σ κ is topologically transitive on X κ if (Π, O) is dense in X κ , for every nonempty open set O. Using the fact that [0, 1] κ is dense in X κ , one shows easily that Π is topologically transitive on X κ iff it is topologically transitive on the κcube. By standard arguments [27,Theorem 5.9], this amounts to the existence of a point in [0, 1] κ (or a G δ dense set of such points) whose Π-orbit is dense.
If Π is topologically transitive and the set of points whose Π-orbit is finite is dense, then we say that Π acts chaotically. By Lemma 6.1(iii) and Corollary 6.2, Σ n acts chaotically both on X n and on [0, 1] n . It is well known that a chaotic action on a space such as [0, 1] n implies sensitive dependence on initial conditions, hence chaotic behaviour in the sense of Devaney [4].
One constructs easily chaotic elements of Σ n . Indeed, the standard tent map on [0, 1] is a McNaughton function, expressible by the formula s(x 0 ) = (x 0 ∧ ¬x 0 ) ⊕ (x 0 ∧ ¬x 0 ). The substitution σ : x i → s(x i ), for i < n, induces therefore on [0, 1] n the direct product of n tent maps, which is mixing w.r.t. Lebesgue measure. Hence σ acts in a topologically transitive and chaotic way. It is not so easy to construct elements of Ξ n which are chaotic; we will obtain such mappings for even n in Corollary 6.7. Lemma 6.3. Let σ ∈ Ξ n , let S be the induced McNaughton homeomorphism of [0, 1] n , and let W be a complex over the n-cube such that S has the form ( * * ) on each n-dimensional cell C j of W . Then all the matrices A j have the same determinant, which is either +1 or −1.
Proof. Since the inverse of S is expressible as in ( * * ) via matrices and vectors having integer entries, it is clear that all matrices A j are invertible and their inverses have integer entries. Therefore all A j 's have determinant ±1. Suppose by contradiction that the n-dimensional cells of W are C 1 , . . . , C k and that there is some 1 ≤ r < k such that det(A j ) = +1 for 1 ≤ j ≤ r, and det(A j ) = −1 for r < j ≤ k. If 1 ≤ j ′ ≤ r and r < j ′′ ≤ k, then C j ′ and C j ′′ cannot intersect in an (n − 1)dimensional face, because this would contradict the injectivity of S. Let D be the topological interior of the n-cube, E = D ∩ (C 1 ∪ · · · ∪ C r ), F = D ∩ (C r+1 ∪ · · · ∪ C k ). Then E and F are nonempty, and closed in the relative topology of D. By [17,Theorem 1.17], (E \ F ) ∪ (F \ E) = D \ (E ∩ F ) is not connected, and this contradicts [16,Theorem 3.61], since E ∩ F has topological dimension ≤ n − 2.
Corollary 6.4. For every n and every σ ∈ Ξ n , the homeomorphism S preserves the Lebesgue measure on [0, 1] n . Proof. If S is induced by σ ∈ Ξ 1 , then either S has the form x 0 + k p (with k p ∈ Z) in every p in which S is differentiable, or the form −x 0 + k p . Since the range of S is [0, 1], it must be k p = 0 in the first case, or k p = 1 in the second.
The following is the main result of [25].
Theorem 6.6. There is an explicitly constructible family {σ lm : 1 ≤ l, m ∈ N} of elements of Ξ 2 such that, for every σ lm in the family, the induced McNaughton homeomorphism S lm has the following properties: (i) S lm fixes pointwise the boundary of [0, 1] 2 ; (ii) S lm is ergodic with respect to the Lebesgue measure of the unit square; (iii) S lm is non-uniformly hyperbolic and Bernoulli.
We recall that a measure-preserving bijection is Bernoulli if it is measuretheoretically isomorphic to a Bernoulli 2-sided full shift. It would be very interesting to construct a McNaughton homeomorphism of [0, 1] 3 having the Bernoulli property: this would allow to extend Corollary 6.7 to all n ≥ 2. Up to now, we can only prove the following result about the action of Ξ n as a group.
Proof. As discussed above, we have a stronger result for even n, so we assume n odd. Let S and T be topologically transitive McNaughton homeomorphisms of [0, 1] n−1 and [0, 1] 2 , respectively. Consider the following direct products: For every Borel probability measure µ on [0, 1] n , let f µ (r) denote the integral of the formula r(x 0 , . . . , x n−1 ) (viewed as a function r : [0, 1] n → [0, 1]) with respect to µ. The number f µ (r) may be thought of as the "average truth-value" of r w.r.t. µ. It is natural to restrict attention to measures which are faithful (r = 0 implies f µ (r) = 0) and automorphism-invariant (f µ (r) = f µ (σ(r)), for every σ ∈ Ξ n ). This latter property is particularly relevant: it says that the average truth-value of a formula should be intrinsic to the formula, and not depending on the particular embedding of it in Free n (MV ). Lebesgue measure λ is faithful (clearly) and automorphism-invariant (by Corollary 6.4). Let µ be another probability measure on [0, 1] n , absolutely continuous with respect to λ. We may assume that n is even, possibly introducing a dummy variable. By Corollary 6.7, there exists an automorphism σ of Free n (MV ) that induces a mixing homeomorphism S on [0, 1] n . Therefore the push forward S k * µ of µ by S k converges to λ in the weak * topology [27, §4.9 and Theorem 6.12(ii)]. In particular, for r as above we get lim k→∞ f µ (σ k (r)) = lim k→∞ r • S k dµ = lim k→∞ r d(S k * )µ = r dλ = f λ (r).
Hence the existence of mixing McNaughton homeomorphisms gives a distinguished status to λ. It appears plausible that the only ergodic Ξ n -invariant measures on [0, 1] n are λ and the measures supported on finite orbits. We leave this as an open problem: since measures supported on finite orbits are not faithful, a positive answer would imply that the only reasonable averaging measure on truth-values in Lukasiewicz logic is Lebesgue measure.