Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Classical Logic as Limit Completion Workshop on Proof Theory and Algorithms 23 to 29 March 2003, Edinburgh Stefano Berardi - Università di Torino http://www.di.unito.it/~stefano • The text of this talk and some related papers may be found in the home page of the author: http://www.di.unito.it/~stefano 2 Acknowledgements • We thank Prof. S. Hayashi for suggesting the use of limits in modelizing Classical Arithmetic. • We thank all S. Hayashi’s Proof Animation Group, and in particular Y. Akama, for many valuable suggestions and comments. • We owe the idea for the constructive content of Excluded Middle and the use of backtracking to Coquand Game interpretation. 3 The thesis of the Talk • Call N = {0, 1, 2, 3, …} the set of natural numbers. • The thesis of the Talk is: • “Classical Logic is equivalent to an intuitionistic (and informative) theory of some topogical completion N of N.” 4 An overview of the results • There is a purely intuitionistic model N of the set of arithmetical maps, which is a topological completion of N. • On the top of N, we may define an Intuitionistic Realization R of Classical Arithmetic, explicitely showing some constructive content for all classical proofs. • No proof manipulation is required: the interpretation is semantical, not syntactical. • We extract some constructive content from all proofs of existential statement, not just from 5 proofs of simply existential statements. Plan of the Talk • § 1. The constructive content of Excluded Middle. • § 2. An intuitionistic model of 02-maps. • § 3. An intuitionistic model of Excluded Middle over 1-quantifier formulas. • § 4. An intuitionistic model of the whole Classical Arithmetic. 6 §1. The constructive content of Excluded Middle • Call EM the Excluded Middle Schema AA, and EM-k its restriction to all A of degree k. • EM-1 is equivalent to • xN.P(x) xN.P(x) (P(x) decidable) • Call T the set of instants of time. T is an inhabited unbounded partial ordering. Say, T =N. • The constructive content of EM-1 is a recursive process E, learning, with time, whether xN.P(x) is true or not. • Let us see how E works. 7 The process E • Fix any instant of time tT. • Call a(t)={x1,…,xn} the set of xiN such that we computed the truth value of P(xi) before instant t. • Call E(t){False}+N the opinion of E, in the instant t, about the truth of xN.P(x). • E(t) is False if E thinks that xN.P(x) is false. E(t) is some xN if E thinks that P(x) holds. • E returns some xi a(t) such that P(xi) (such that the value of P(xi) is known), if any exists. • If none exists, E says: “xN.P(x) is false”. 8 • How much is the opinion of E reliable ? Unreliability of E • The opinion of E is quite unreliable. • In the case P is false over a(t)={x1,…,xn}, and true for some xN-a(t), E thinks that xN.P(x) is false. This is wrong. • E changes its mind in the first instant some x such that P(x) is found. However, E could never find some x such that P(x), unless we sistematically compute P(x) for all xN. • If P is false for all xN, the opinion of E is correct. But we will never know for sure it is, because xN.P(x) is undecidable (in general). 9 • So what? Is there any use of E(t)? The use of E • In spite of the first impression, E(t) is all we need to know about xN.P(x) xN.P(x). • Fix any instant of time tT, and any computation working out a verifiable conclusion under the assumption xN.P(x) xN.P(x). • Up to the instant t, the computation either used the assumption xN.P(x); or it used the assumption xN.P(x), but not for all xN, only for a finite subset a(t)={x1,…,xn}N. • In fact, the computation worked under the assumption xN.P(x) xa(t).P(x). • This is exactly the information provided by E(t).10 Backtracking with E • A price to pay to compute with E is backtracking. • Whenever E changes its mind about the truth of xN.P(x), everything we computed out of the value of E(t) must be discarded and recomputed again. 11 § 2. A model of 02-maps • A preliminary conclusion. We have a constructive content of EM-1, provided we accept, as individuals, not only integers but also all sequences s:TX indexed over time, with target some XN. • We consider only convergent sequences. s(t) is not be allowed to change its value infinitely many times. We identify s with its limit value. • The next step. If we want a purely intuitionistic model, we need an intuitionistic theory of convergent successions over integers. The existing one is classical. 12 Stationarity is not enough • Suppose for simplicity T=N (the instants of time are disposed along a single timeline 0, 1, 2, 3, …). • We develop an intutionistic theory of convergence for sequences s: NN. • s is stationary iff xN.yx. s(y)=s(x). • Classically, convergence is stationarity. • Intuitionistically, stationarity it does not work: we cannot prove that E(t) is stationary. 13 An intuitionistic notion of convergence • Intutionistically, we define s convergent iff s satisfies the no-CounterExample interpretation of stationarity. • Classically, convergence is equivalent to stationarity. • Intuitionistically, convergence is equivalent to: :NN rec.. xN. s constant over [x, (x)] • Now we can prove that E is convergent. • What it is the intuition behind “convergence” ? 14 The intuition behind convergence • We fix any effective upper limit (x) (depending on x) to the set of yx for which we will check s(y)=s(x) (the stationarity of s in x). • (x) represents the computational resources available to check if x is stationary. • Then, no matter what is, we find some x looking like a stationarity point, with respect to the segment [x,(x)] we have time to check: s(0)=21 s(1)=13 … [s(x)=7 s(x+1)=7…s((x))=7] s(…)=55 15 An intuitionistic notion of equality for succession • s, t: NN are stationary equal iff xN.yx. s(y)=t(y) • Classically, equality between convergent successions is being stationary equal. • Intutionistically, we say that s~t iff s, t satisfies the no-CounterExample interpretation of stationary equality. • Classically, s~t is equivalent to stationary equality. 16 An intuitionistic notion of equality for succession • s~t is intuitionistically equivalent to: :NN rec.. xN. s,t equal over [x, (x)] • This means: no matter what is, we find some x looking like a stationarity point, with respect to the segment [x,(x)] we suppose having “time to check”: s(0)=21 s(1)=13 … [s(x)=7 s(x+1)=8…s((x))=9] s(…)=55 t(0)=33 t(1)=60 … [t(x)=7 t(x+1)=8…t((x))=9] t(…)=88 17 The structure N2 • Define N2={convergent successions s:NN}/~ • N2 is completion of N under convergent successions (similar to the definition of Real number out of Rational numbers). • Any xN may be identified with some constant succession x*:NN, defined by x*(t) = x, for all tT • Any recursive map f:NN2, over xN, may be extended to a map f*:N2N2 over all s:NN, by the so-called syncronous application: f*(s)(t) = f(s(t))(t), for all tT 18 • The maps f* are by defin. the morphisms of N2. N2 is an intuitionistic model of 02-maps • Maps f*:N2N2 include (simulations of) decision procedures for all simply existential predicates. Maps f*:N2N2 are closed under moperator, whenever the resulting map is total. • N2 is an equational model for 02-maps. • Simply existential properties over N2 are all sets of the form {xN2| yN2. f*(x,y) = 0} • for some morphism f*:N2N2 • Lifting. A simply existential property holds for all xN2 iff it holds for all (images in N2 of)19 points nN. Relating N2 and N • Induction for equational statements holds in N2. • N and N2 are classically isomorphic, yet they are not recursively isomorphic. • Thus, N and N2 are not intuitionistically isomorphic • Intutionistically, N2 “looks larger than N”. 20 The main feature of N2 is Conservativity • In N2 we derive abstract statements s~t, about the identity of limits whose exact value, often, will never be known. We could think that results about N2 have nothing to do with N. • Instead, the conclusions we draw about N2 have consequences about N. • (Conservativity, or Density of N in N2) Any solution we find in N2, of some recursive equation f(x)=0 of N, may be effectively turned into some solution nN of the same equation. • Thus, abstract reasoning in N2 may be used to 21 effectively solve concrete problems in N. The main feature of N2: Conservativity • Conservativity has a remarkably simple proof. • (Proof of Conservativity) Fix any recursive map f:NNN2. Assume LN2 is a solution of f(x)=0 in N2. This means that f*(L)~0. By definition, for any recursive we may effectively find some nN such that f(L(x))=0 for all x[n,(n)]. Set =id. Then f(L(x))=0 for all x[n,n]. Thus, we may effectively find some nN such that f(L(n))=0. 22 § 3. A model R2 for Intuitionistic Arithmetic + EM-1 • Recall that EM-1 is Excluded Middle over 1quantifier formulas. • We will extend N2 to a Realization Model R2 for Intuitionistic Arithmetic and EM-1. • Using the family of constants E we will realize EM-1. • There is a difference with Heyting Realizability: we realize a statement not in an absolute sense, but under a set of equational assumptions. 23 Relative Realization • The realization relation will be |=r:A, with ={a1~b1, …, an~bn} set of equations over N2. • The intended meaning is: “if all equations in are true, then r realizes A”. • In this way, realization of atomic statement in N2 will be relative recursive (w.r.t. N2), rather than recursive. This is unavoidable because equality in N2 is not recursive. • |=r:A will stay for |=r:A or “r realizes A without assumptions”. 24 Some preliminaries about N2 • Limit value. LN2 has limit nN iff L~n*. • The set {1,2}*. We define: {1,2}* = {xN2| x:N{1,2} } • The elements of {1,2}* are succession with limit in {1,2}. We cannot decide if it is 1 or 2, though. • Truth in N2. We say that (a1~b1, …, an~bn a~b) is true in N2 • iff the limit of truth value of (a1(t)=b1(t) …, an(t)=bn(t)a(t)=b(t)), for tN, is True. • Intuitionistically, this condition is stronger than 25 just “a1~b1, …, an~bn implies a~b”. The Realization Model R2 • |=dummy:a~b iff (a~b) is true in N2 • |=<c,r1,r2>:A1A2 iff c{1,2}* and for i=1,2 ,(c=i)|=ri:Ai • |=<r1,r2>:A1A2 iff for i=1,2 |=ri:Ai • |=f:A1A2 iff for all if |=s:A1 then |=f(s):A2 • |=<c,s>:x.A(x) iff |=s:A(c) • |=f:x.A(x) iff for all aN2 |=f(a):A(a) 26 The main feature of R2: Conservativity • R2 inherites Conservativity from N2. • (Conservativity) If P is a decidable statement of N, and x.P(x) is realizable in R2, then we may effectively find some nN such that P(n). • Thus, intuitionistic reasoning in R2 may be used to effectively solve concrete problems in N. • Yet, intuitionistic reasoning in R2 includes (better, it simulates) Excluded Middle for 1-quantifier statements! 27 Comparing a connective with its interpretation: , • The interpretations , xN2 of , xN are intuitionistically weaker than the original , xN. • Intuitively, if we prove A1A2 in R2, we have some c {1,2}* , such that if the value of c is i, then Ai is true in R2. But we have no way of computing the value of c. In an intuitionistic proof of A1A2, we know which Ai is true in R2. • Intuitively, if we prove xN.A(x) in R2, we have some cN2 such that A(c) is true in R2, but we do not know the value of c. In an intuitionistic proof of xN.A(x), we know which A(i) is true.28 Comparing a connective with its interpretation: , • The interpretations , xN2 of , xN are intuitionistically equivalent to the original , xN. • In the case of , this claim requires a proof based over the density of N in N2. 29 Comparing a connective with its interpretation: , • The interpretations , of , are intuitionistically stronger than the original ,. • Intuitively, if we prove A1 A2 in R2, we have a way of sending each proof of A1 in R2, under assumption , into a proof of A2 in R2, under assumption . In an intuitionistic proof, we consider only the case =. • In the same way, if prove A in R2 we know more than just the falsity of A in R2. 30 § 4. A model of the whole Classical Arithmetic • In the construction of R2, we used only Intuitionistic Arithmetical reasoning, plus two properties of N2: 1. Density of N in N2. Every recursive map f:NN2 may be extended in a unique way to a map f*:N2N2. 2. Conservativity of N2 w.r.t. N. Every simple existential predicate of N2 covering N covers the whole N2. 31 Extending R2 to a model R of Classical Arithmetic • • • • • Any model N of N satisfying Density and Conservativity may be extended to a Realization Model R of Intuitionistic Arithmetic. This construction may be performed within Intuitionistic Arithmetic. Fix any k=1,2,3,…,. If N is also a model of 0k-maps, then R is a model of EM-k (Excluded Middle over degree k formulas). If k=, then R models Classical Arithmetic. 32 Iterating Completion of N • • • • • • For all k, we may define a model Nk of 0kmaps satisfying Density and Conservativity, then a model Rk of EM-k on the top of it. We define N3 by interpreting in R3 the completion N2 of N. This is possible because the construction of N2 requires only arithmetical reasoning. More in general, we define Nk+1 by interpreting in Rk the completion N2 of N. Then we define Rk+1 on the top of Nk+1. We get N2, R2, N3, R3, …in this order. 33 A more direct definition of Nk • • • • • We may define a model Nk of 0k-maps satisfying Density and Conservativity directly. Nk is a set of successions of successions … iterated k-1 times. N1 is N. There is a purely combinatorial definition of convergence and equality for elements of Nk. It may be found in the 2002 talk “Classical Logic as Limit”, Section 4 in the author’s web site: http://www.di.unito.it/~stefano 34 A direct definition of Nk • • • • • Intuitively, Nk consists of learning processes with “backtracking” of level k-1. Level 1 backtracking is the possibily of making hypothesis, then discard it forever if we find some contradiction with data. An example is the process EN2. Level 2 backtracking is the possibily of making level 2 hypothesis over level 1 hypothesis (hypothesis over data). When a level 2 hypothesis is discarded, it is not discarded forever. We may come back to it, and 35 reconsider it again. A Claim: Generalized Conservativity • • • • Using the family Nk of models we may prove the following new result, generalizing a Conservativity result from literature: Theorem: EM is conservative w.r.t. EM-k, for all statements x.P(x), with P of degree k. This means: if P is a degree k predicate, and there is proof of x.P(x) using EM, then there is a proof of x.P(x) using only EM-k. Conservativity of Classical w.r.t. Intuitionistic Arithmetic and x.P(x) statements, with P decidable, follows as a particular case, when 36 k=0. Related Papers • Classical Logic as Limit. An intuitionistic model of 02-maps using Parallel Computations. Submitted to I.C.. Available in: http://www.di.unito.it/~stefano • An Intuitionistic Model of Classical Arithmetic and Arithmetical maps. Draft Version. 37 Learning Processes and Parallel Computations First APPSEM-II Workshop 26 to 28 March 2003 Nottingham, United Kingdom Stefano Berardi - Università di Torino Reference • In this talk we introduce the following paper (submitted to I.C.): • Classical Logic as Limit. An intuitionistic model of 02-maps using Parallel Computations • The paper is in the proceedings of the workshop. The talk and the paper are also available in http://www.di.unito.it/~stefano 39 Learning Processes and programming • The goal of the paper is to use Learning processes in order to simulate non-recursive processes inside real programming • in an intuitionistic, informative, semantic, and compositional way. 40 Using Parallel Computations • Using parallel computations we may define a model of learning processes which is more efficient, and more adherent to our intuition of what “learning” is. • In the next page, we introduce an example of process “learning” the truth value of a non-decidable statement. Then we will represent it using parallel computations. 41 A process E learning if xN.P(x) We change our mind to xN.P(x) true We never change our mind again We deduce P(x6) is false We check and we find P(x6) true We deduce P(x4) is false We check it indeed is We deduce P(x5) is false We check it indeed is Start: we know P(x1), P(x2), P(x3) are false We assume xN.P(x) is false What a Learning processes does 1. A learning process makes some hypothesis coherent with the available data. 2. It starts a computation from such hypothesis. 3. During such computation it gathers new data. 4. Whenever some new datum contradicts its hypothesis, it produces a new hypothesis. 5. After producing a new hypothesis it restarts the computation. 6. Points 1-5 are repeated over and over again. 43 Convergence • Classically, a learning process process is convergent iff (like E in the previous page) it is stationary (it is constant from some stage on) in all possible computations. • The notion of convergence may be reexpressed intutionistically, by taking the no-counterexample interpretation of stationarity. 44 Learning processes are Parallel computations • The search for new data may be seen as the choice of a particular timeline in the space of the event. • Searches done by different processes are on different subsets of data, and they may be thought taking place in parallel. 45 Learning processes are non-Deterministic • A process may change its hypothesis when receiving some counterexample from some other process. • When many counterexamples are sent, only one of them is chosen, in a nondeterministic way. 46 Outline of the paper • In the paper we define the notions of: 1. time (an unbounded partial ordering); 2. forking of timelines (to describe different possible computations); 3. interfering with a timeline, executing some actions (to describe a process); 4. forcing a timeline to satisfy a particular property. 47 Outline of the results 1. Our processes have an intuitionistic notion of convergence and of equality. 2. We defined a notion of morphisms over processes. 3. Morphisms and convergent processes, quotiented up to process equality, are: an intuitionistic model of 02-maps using parallel computations 48 Conclusions • Learning allows to use simulations of nonrecursive maps in real programming. • Parallel non-deterministic computations implement learning processes in a way which is more efficient, and more adherent to our intuition of what learning is. 49 Appendix: Event Structure • An Even Structure is any list <T, T, A, act> such that • T,T is any inhabited, unbounded recursive partial ordering. Elements of T denote instants of time. • A is a finite or infinite recursive subset of N, denoting a set of actions which may take place in any given instant. • act:T {finite subsets of A} is any recursive, weakly increasing map. act(t) denotes the finite set of actions which took place up to instant t. 50 Timelines and Strategies • A timeline is any recursive map :N T. • A strategy is any recursive map A: T{finite subsets of A} suggesting in any instant some action to do. • A timeline follows what a strategy A suggests in a step i iff t executes the actions A(i) in some step j. That is, iff A(i) act(j) for some j. • A team is any group of strategy changing with time, coded by a recursive map F:T{finite sets of strategies}. 51 Forcing a property • A timeline follows (the suggestions of) a strategy A iff follows A in infinitely many steps. • A timeline follows (the suggestions of) a team F iff for infinitely many i, if AF(i) then follows A in i. • A strategy (team) forces a property P of timelines iff all timelines following the strategy (team) satisfy P. • A property P may be forced iff there is some team forcing it. 52 Learning maps and Equality • Fix two maps L, M:TN (any two successions indexed by time). • For any timeline :NT, we have L, M:N N. Define a property P() of timelines by “L is convergent (as succession over integers)”. • We say that L is convergent (that is is a learning map) iff there is a team F forcing the property: “L is convergent” • We say that L, M are equal iff there is a team F forcing the property: “L, M are convergent to the same limit” 53 Morphisms • A map f*:{learning maps}{learning maps} • is a morphisms on learning maps iff there is some recursive map f:N{learning maps} • such that, for all tT f*(L)(t) = f(L(t))(t) 54