CORNELL CS 611 - Lecture 19 The Fixed Point Theorem

Unformatted text preview:

CS611 Lecture 19 The Fixed Point Theorem 9/20/00Scribe: based on notes by Reba Schuller and Yuval Gabay Lecturer: Andrew Myers1ReviewGoal: We want to define C[[ while b do c]] to be the least fixed point of F whereF = λf ∈ Σ → Σ⊥.λσ ∈ Σ. if ¬B[[ b]] σ then σ else strict(f,C[[ c ]] σ)wherewedefinestrict as follows:strictdef= λf ∈ Σ → Σ⊥, ¯σ ∈ Σ⊥. if ¯σ = ⊥ then ⊥ else f (¯σ)Since the functions Fn(⊥) approximate the desired result arbitrarily closely, we suspect that the followingdenotation might be what we want:C[[ while b do c]] =n∈ωFn(⊥)Problems:• The least upper bound might not exist. Σ → Σ⊥is a cpo, which ensures that every chain has a LUB.What if the functions Fn(⊥)donotformachain?• Assuming the LUB exists, it might not be a fixed point of F, let alone the least one.Solution: We introduce some conditions under which the LUB exists and equals the least fixed point, andthen we show that these conditions hold for our F.2 Monotonicity and ContinuityDefinition: Let (D, )beacpo,F : D → D a function. F is monotonic if∀x, y ∈ Dx y → F (x)  F (y).Claim: If (D, , ⊥) is a pointed cpo and F : D → D is monotonic then the elements Fn(⊥)formanincreasing chain in D:⊥ F (⊥)  F2(⊥)  ...Proof: Since ⊥ is the least element of D, we have⊥ F (⊥).Monotonicity of F gives∀n ∈ ωFn(⊥)  Fn+1(⊥) ⇒ Fn+1(⊥)  Fn+2(⊥).The result follows by induction.Notice that if F : D → D is monotonic and x0 x1 x2 ... is a chain in D, then F (x0)  F (x1) F (x2)  ... is also a chain in D. This permits the following definition.1Definition: Let (D, )beacpo,F : D → D a monotonic function. F is continuous if for every chainx0 x1 x2 ...in D, F preserves the LUB operator:n∈ωF (xn)=F (n∈ωxn).3 The Fixed Point TheoremWe will now show that the properties of monotonicity and continuity allow us to compute the least fixedpoint as desired.Claim: Let (D, ) be a cpo, and let F : D → D be a monotonic continuous function. Thenn∈ωFn(⊥)is a fixed point of F .Proof: By continuity of F ,F (n∈ωFn(⊥)) =n∈ωF (Fn(⊥))Applying F ,=n∈ωFn+1(⊥)Reindexing,=n=1,2,...Fn(⊥)By definition of ⊥,= ⊥n=1,2,...Fn(⊥)And, finally, absorbing the join with ⊥ into the big join,=n∈ωFn(⊥)We now know that monotonicity and continuity guarantee thatn∈ωFn(⊥)isafixedpointofF .Wealso wantn∈ωFn(⊥)tobetheleast fixed point of F . To show this, we must prove that y = F (y) ⇒n∈ωFn(⊥)  y. We can actually prove something even stronger.Definition: Let (D, )beacpo,F : D → D a function. x ∈ D is a prefixed point of F if F (x)  x.Notice that every fixed point of F is also a prefixed point. As a consequence, if a fixed point of F is theleast prefixed point of F, it is also the least fixed point of F.Claim: Let (D, , ⊥) be a pointed cpo. For any monotonic continuous function, F : D → D,n∈ωFnisthe least prefixed point of F .2Proof: Suppose y is a prefixed point of F . By definition of ⊥,⊥yTaking F of both sides,F (⊥)  F (y)  yInductively, for all n ≥ 0,Fn(⊥)  yBecause y is an upper bound for all the Fn(⊥), it must be at least as large as their least upper bound:n∈ωFn(⊥)  yWe have now proven:The Fixed Point Theorem: Let (D, , ⊥) be a pointed cpo. For any monotonic continuous function,F : D → D,n∈ωFnis the least fixed point of F .We have actually encountered an instance of the fixed point theorem before. Recall lecture 6, when wedefined the set of all elements derivable in some rule system to be the least fixed point of the rule operator,R. Our proof in that case was an instantiation of the fixed point theorem on the CPO consisting of allsubsets of a set, ordered by set inclusion:R = F∅ = ⊥ =⊆=The tricky part of the earlier proof corresponded to showing that R is a continuous operator, which was truebecause we only allow inference rules with a finite number of premises.4 Reinterpreting →Because we are mostly interested in continuous functions in this course, we will from now on interpret thenotation D → E as denoting the continuous functions from D to E rather than all functions from D to E(which can be written as ED, as before).5BacktowhileNow we can finally complete the denotational semantics of IMP. We define the meaning of a while statementas:C[[ while b do c]] = fixΣ→Σ⊥λf ∈ Σ → Σ⊥.λσ ∈ Σ. if ¬B[[ b]] σ then σ else strict(f,C[[ c ]] σ)where the least fixed point operator on domain D, fixD, is defined as follows:fixdef= λf ∈ D → D.n∈ωfn(⊥)3To check this definition, consider the denotation of while true do skip, which we expect to be λσ ∈ Σ. ⊥:C[[ while true do skip]] = fixΣ→Σ⊥λf ∈ Σ → Σ⊥.λσ ∈ Σ. if ¬B[[ b]] σ then σ else strict(f,C[[ c ]] σ)= fixΣ→ Σ⊥λf ∈ Σ → Σ⊥.λσ ∈ Σ. strict(f,C[[ c]] σ)= fixΣ→Σ⊥λf ∈ Σ → Σ⊥.λσ ∈ Σ.f(σ)= fixΣ→Σ⊥λf ∈ Σ → Σ⊥.fThe function we are taking the fixed point of is the identity function, and its least fixed point is ⊥Σ→Σ⊥,which is what fix will give us.Now let us verify that our definition of the meaning of while works by checking that F is continuous.First of all, F must be monotonic. Consider an arbitrary pair of functions f , fwhere f  f.Wewanttoshow that F (f )  F (f), which is true iff for all σ, F (f )(σ)  F (f)(σ). Consider an arbitrary σ.If¬B[[ b]] σor C[[ c]] σ = ⊥, the required relationship holds trivially. Otherwise, we require f (C[[ c]] σ)  f(C[[ c]]Σ), whichfollows from f  f.For F to be continuous, we also must havenF (fn)=F (nfn) for all chains fn. This also followsstraightforwardly:F (fn)=λσ ∈ Σ. if ¬B[[ b]] σ then σ else strict(fn, C[[ c]] σ)= λσ ∈ Σ.if ¬B[[ b]] σ then σ else strict(fn, C[[ c ]] σ)= λσ ∈ Σ. if ¬B[[ b]] σ then σ elsestrict(fn, C[[ c ]] σ)= λσ ∈ Σ. if ¬B[[ b]] σ then σ elsestrict(fn, C[[ c ]] σ)= λσ ∈ Σ. if ¬B[[ b]] σ then σ else(if C[[ c]] σ = ⊥ then ⊥ elsefn(C[[ c]] σ))= λσ ∈ Σ. if ¬B[[ b]] σ then σ else(if C[[ c]] σ = ⊥ then ⊥ elsefn(C[[ c]] σ))= λσ ∈ Σ. if ¬B[[ b]] σ then σ else (if C[[ c]] σ = ⊥ then ⊥ elsefn(C[[ c]] σ))= λσ ∈ Σ. if ¬B[[ b]] σ then σ


View Full Document

CORNELL CS 611 - Lecture 19 The Fixed Point Theorem

Download Lecture 19 The Fixed Point Theorem
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 19 The Fixed Point Theorem and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 19 The Fixed Point Theorem 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?