Lattices and the Knaster-Tarski Theorem

Similar documents
Lecture 14: Basic Fixpoint Theorems (cont.)

Semantics and Verification of Software

École normale supérieure, MPRI, M2 Year 2007/2008. Course 2-6 Abstract interpretation: application to verification and static analysis P.

Recall: Data Flow Analysis. Data Flow Analysis Recall: Data Flow Equations. Forward Data Flow, Again

Lattice Model of Flow

The illustrated zoo of order-preserving functions

Principles of Program Analysis: Abstract Interpretation

CTL Model Checking. Goal Method for proving M sat σ, where M is a Kripke structure and σ is a CTL formula. Approach Model checking!

Principles of Program Analysis: Algorithms

Chair of Communications Theory, Prof. Dr.-Ing. E. Jorswieck. Übung 5: Supermodular Games

Filters - Part II. Quotient Lattices Modulo Filters and Direct Product of Two Lattices

CATEGORICAL SKEW LATTICES

Best response cycles in perfect information games

Notes on Natural Logic

Mathematics Notes for Class 12 chapter 1. Relations and Functions

EDA045F: Program Analysis LECTURE 3: DATAFLOW ANALYSIS 2. Christoph Reichenbach

The Real Numbers. Here we show one way to explicitly construct the real numbers R. First we need a definition.

Gödel algebras free over finite distributive lattices

An effective perfect-set theorem

Yao s Minimax Principle

Residuated Lattices of Size 12 extended version

CSC 474/574 Information Systems Security

MAT25 LECTURE 10 NOTES. = a b. > 0, there exists N N such that if n N, then a n a < ɛ

Strong normalisation and the typed lambda calculus

The Turing Definability of the Relation of Computably Enumerable In. S. Barry Cooper

Structural Induction

TABLEAU-BASED DECISION PROCEDURES FOR HYBRID LOGIC

Sublinear Time Algorithms Oct 19, Lecture 1

Essays on Some Combinatorial Optimization Problems with Interval Data

Maximizing the Spread of Influence through a Social Network Problem/Motivation: Suppose we want to market a product or promote an idea or behavior in

25 Increasing and Decreasing Functions

Modular and Distributive Lattices

Introduction to Priestley duality 1 / 24

CONSTRUCTION OF CODES BY LATTICE VALUED FUZZY SETS. 1. Introduction. Novi Sad J. Math. Vol. 35, No. 2, 2005,

TEST 1 SOLUTIONS MATH 1002

Lecture l(x) 1. (1) x X

A relation on 132-avoiding permutation patterns

An Application of Ramsey Theorem to Stopping Games

Lattice-Theoretic Framework for Data-Flow Analysis. Defining Available Expressions Analysis. Reality Check! Reaching Constants

INFLATION OF FINITE LATTICES ALONG ALL-OR-NOTHING SETS TRISTAN HOLMES J. B. NATION

Epimorphisms and Ideals of Distributive Nearlattices

Forecast Horizons for Production Planning with Stochastic Demand

Generating all modular lattices of a given size

Another Variant of 3sat. 3sat. 3sat Is NP-Complete. The Proof (concluded)

Laurence Boxer and Ismet KARACA

Alain Hertz 1 and Sacha Varone 2. Introduction A NOTE ON TREE REALIZATIONS OF MATRICES. RAIRO Operations Research Will be set by the publisher

Crash-tolerant Consensus in Directed Graph Revisited

Risk Management for Distributed Authorization

6 -AL- ONE MACHINE SEQUENCING TO MINIMIZE MEAN FLOW TIME WITH MINIMUM NUMBER TARDY. Hamilton Emmons \,«* Technical Memorandum No. 2.

( ) = R + ª. Similarly, for any set endowed with a preference relation º, we can think of the upper contour set as a correspondance  : defined as

10.1 Elimination of strictly dominated strategies

Handout 4: Deterministic Systems and the Shortest Path Problem

Coordination Games on Graphs

Supporting Information

Optimal Satisficing Tree Searches

Lattice Properties. Viorel Preoteasa. April 17, 2016

Rational Behaviour and Strategy Construction in Infinite Multiplayer Games

Notes on the symmetric group

Informative Cheap Talk Equilibria as Fixed Points

MATH 121 GAME THEORY REVIEW

Theoretical Frameworks for Routing Problems in the Internet. Menglin Liu

Interpolation of κ-compactness and PCF

Dynamic Programming: An overview. 1 Preliminaries: The basic principle underlying dynamic programming

A Property Equivalent to n-permutability for Infinite Groups

CSE 21 Winter 2016 Homework 6 Due: Wednesday, May 11, 2016 at 11:59pm. Instructions

arxiv: v1 [math.lo] 24 Feb 2014

INTERVAL DISMANTLABLE LATTICES

On the Optimality of a Family of Binary Trees Techical Report TR

Projective Lattices. with applications to isotope maps and databases. Ralph Freese CLA La Rochelle

Modes of Convergence

Outline of Lecture 1. Martin-Löf tests and martingales

Comparison of proof techniques in game-theoretic probability and measure-theoretic probability

Computational Intelligence Winter Term 2009/10

The Value of Information in Central-Place Foraging. Research Report

MAC Learning Objectives. Learning Objectives (Cont.)

TOPIC LATTICE-BASED ACCESS-CONTROL MODELS. Ravi Sandhu

Sy D. Friedman. August 28, 2001

Another Variant of 3sat

Laurence Boxer and Ismet KARACA

CONGRUENCES AND IDEALS IN A DISTRIBUTIVE LATTICE WITH RESPECT TO A DERIVATION

Lecture 5: Tuesday, January 27, Peterson s Algorithm satisfies the No Starvation property (Theorem 1)

Lecture 2: The Simple Story of 2-SAT

Advanced Microeconomics

GAME THEORY. Department of Economics, MIT, Follow Muhamet s slides. We need the following result for future reference.

Economics 209A Theory and Application of Non-Cooperative Games (Fall 2013) Repeated games OR 8 and 9, and FT 5

Untyped Lambda Calculus

IEOR E4004: Introduction to OR: Deterministic Models

4 Martingales in Discrete-Time

Continuous images of closed sets in generalized Baire spaces ESI Workshop: Forcing and Large Cardinals

CIS 540 Fall 2009 Homework 2 Solutions

Characterizing large cardinals in terms of layered partial orders

On the Lower Arbitrage Bound of American Contingent Claims

ExpTime Tableau Decision Procedures for Regular Grammar Logics with Converse

ECON 214 Elements of Statistics for Economists 2016/2017

On Existence of Equilibria. Bayesian Allocation-Mechanisms

Chain conditions, layered partial orders and weak compactness

THE TRAVELING SALESMAN PROBLEM FOR MOVING POINTS ON A LINE

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Semantics with Applications 2b. Structural Operational Semantics

1 Precautionary Savings: Prudence and Borrowing Constraints

Transcription:

Lattices and the Knaster-Tarski Theorem Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 8 August 27

Outline 1 Why study lattices 2 Partial Orders 3 Lattices 4 Knaster-Tarski Theorem 5 Computing LFP

What a lattice looks like {1, 2, 3} oe {1, 2} {1, 3} {2, 3} o e {1} {2} {3} Subsets of {1, 2, 3}, subset Odd/even, contained in

Why study lattices in program analysis? Why lattices? Natural way to obtain the collecting state at a point is to take union of states reached along each path leading to the point. With abstract states also we want a union or join over all paths (JOP). Why fixpoints? Guaranteed to safely approximate JOP (* Conditions apply). Easier to compute than JOP. Knaster-Tarski theorem tells us when a fixpoint exists and what it looks like. 1: p = 5; 2: q = 2; 3: while (p > q) { 4: p := p+1; 5: q := q+2; } 6: print p; (oe, oe) (o, oe) (oe, o) (oe, e) (o, o) (o, e) (e, o) (e, oe) (e, e)

Partial Orders Usual order (or total order) on numbers: 1 2 3. Some domains are naturally partially ordered: {1, 2, 3} 12 oe {1, 2} {1, 3} {2, 3} {1} {2} {3} 4 6 o e Subsets of {1, 2, 3}, subset 2 3 Divisors of 12, divides 1 Odd/even, contained in

Partial orders: definition A partially ordered set is a non-empty set D along with a partial order on D. Thus is a binary relation on D satisfying: is reflexive (d d for each d D) is transitive (d d and d d implies d d ) is anti-symmetric (d d and d d implies d = d ).

Binary relations as Graphs We can view a binary relation on a set as a directed graph. For example, the binary relation {(a, a), (a, b), (b, c), (b, e), (d, e), (d, c), (e, f )} can be represented as the graph: c b d a e f

Partial Order as a graph A partial order is then a special kind of directed graph: Reflexive = self-loop on each node Antisymmetric = no 2-length cycles Transitive = transitivity of edges. Graph representation Hasse-diagram representation

Upper bounds etc. In a partially ordered set (D, ): An element u D is an upper bound of a set of elements X D, if x u for all x X. u is the least upper bound (or lub or join) of X if u is an upper bound for X, and for every upper bound y of X, we have u y. We write u = X. Similarly, v = X (v is the greatest lower bound or glb or meet of X ). d a c b

Lattices A lattice is a partially order set in which every pair of elements has an lub and a glb. A complete lattice is a lattice in which every subset of elements has a lub and glb. {1, 2, 3} oe {1, 2} {1, 3} {2, 3} o e {1} {2} {3}

Lattices A lattice is a partially order set in which every pair of elements has an lub and a glb. A complete lattice is a lattice in which every subset of elements has a lub and glb. Examples below are all complete lattices. {1, 2, 3} oe {1, 2} {1, 3} {2, 3} o e {1} {2} {3}

More lattices (oe, oe) (o, oe) (oe, o) (oe, e) (e, oe) (o, o) (o, e) (e, o) (e, e)

Exercise 1 Example of a partial order that is not a lattice?

Exercise 1 Example of a partial order that is not a lattice? d c a b

Exercise 1 Example of a partial order that is not a lattice? d c a b 2 Simplest example of a partial order that is not a lattice?

Exercise 1 Example of a partial order that is not a lattice? d c a b 2 Simplest example of a partial order that is not a lattice? a b

Exercise 1 Example of a partial order that is not a lattice? d c a b 2 Simplest example of a partial order that is not a lattice? a b 3 Example of a lattice which is not complete?

Exercise 1 Example of a partial order that is not a lattice? d c a b 2 Simplest example of a partial order that is not a lattice? a b 3 Example of a lattice which is not complete? 2 1 0

Monotonic functions f Let (D, ) be a partially ordered set. A function f : D D is monotonic or order-preserving if whenever x y we have f (x) f (y). d b e c a

Partial order induced by a subset of elements Let (D, ) be a partially ordered set, and X be a non-empty subset of D. Then X induces a partial order, which we call the partial order induced by X in (D, ), and defined to be (X, (X X )). Example: the partial order induced by the set of elements X = {2, 3, 12}. 12 12 4 6 2 3 2 3 1

Fixpoints f A fixpoint of a function f : D D is an element x D such that f (x) = x. A pre-fixpoint of f is an element x such that x f (x). A post-fixpoint of f is an element x such that f (x) x. d b e c a

Knaster-Tarski Fixpoint Theorem Theorem (Knaster-Tarski) Let (D, ) be a complete lattice, and f : D D a monotonic function on (D, ). Then: (a) f has at least one fixpoint. (b) f has a least fixpoint which coincides with the glb of the set of postfixpoints of f, and a greatest fixpoint which coincides with the lub of the prefixpoints of f. (c) The set of fixpoints P of f itself forms a complete lattice under.

Fixpoints of f gfp Post Pre lfp (D, ) Stars denote fixpoints.

Exercise Consider the complete lattice and monotone function f below. 1 Mark the pre-fixpoints with up-triangles ( ). 2 What is the lub of the pre-fixpoints? 3 Mark post-fixpoints with down-triangles ( ). 4 Fixpoints are the stars ( ). Check that claims of K-T theorem hold here. If you drop completeness of lattice or monotonicity of f, does K-T still hold? d b f a e c

Proof of Knaster-Tarski theorem (a) g = Pre is a fixpoint of f. (b) g is the greatest fixpoint of f. (c) Similarly l = Post is the least fixpoint of f. (d) Let P be the set of fixpoints of f. Then (P, ) is a complete lattice.

Proof of K-T theorem: (a) f (g) g Pre f (x) x 11 00 (D, )

Proof of K-T theorem: (a) To show g = f (g): f (g) g Pre f (x) x 11 00 (D, )

Proof of K-T theorem: (a) To show g = f (g): g f (g) f (g) g Pre f (x) x 11 00 (D, )

Proof of K-T theorem: (a) To show g = f (g): g f (g) Since f (g) can be seen to be u.b. of Pre. Pre f (g) f (x) x 11 00 g (D, )

Proof of K-T theorem: (a) To show g = f (g): g f (g) Since f (g) can be seen to be u.b. of Pre. f (g) g Pre f (g) f (x) x 11 00 g (D, )

Proof of K-T theorem: (a) To show g = f (g): g f (g) Since f (g) can be seen to be u.b. of Pre. f (g) g Since f (g) can be seen to be prefixpoint of f. Pre f (g) f (x) x 11 00 g (D, )

Proof of K-T theorem: (b) g is the greatest fixpoint of f. f (g) g Pre f (x) x 11 00 (D, )

Proof of K-T theorem: (b) g is the greatest fixpoint of f. Any other fixpoint is also a pre-fixpoint of f, and hence g must dominate it. Pre f (g) f (x) x 11 00 g (D, )

Exercise: intervals and closure Let (D, ) be a partial order, and let f : D D. Let a, b D. The interval from a to b, written [a, b], is the set {d a d b}. A subset X D is said to be closed wrt to f, if f (x) X for each x X. Exercise: Let (D, ) be a partial order with a element, and let f : D D be a monotone function on D. 1 Show that an interval in D need not be closed wrt f. 2 Let u D be the lub of a set X of fixpoints of f. Prove that the interval [u, ] is closed wrt f. d b f a e c

Proof of K-T theorem: (d) (P, ) is also a partial order. (P, ) is a complete lattice Let X P. We show there is an lub of X in (P, ). Let u be lub of X in (D, ). Consider interval I = [u, ] = {x D u x}. (I, ) is also a complete lattice. f : I I as well, and monotonic on (I, ). Hence by part (a) f has a least fixpoint in I, say v. Argue that v is the lub of X in (P, ). u v X (D, )

Chains in partial orders A chain in a partial order (D, ) is a totally ordered subset of D. An ascending chain is an infinite sequence of elements of D of the form: d 0 d 1 d 2. An ascending chain d i is eventually stable if there exists n 0 such that d i = d n0 for each i n 0. (D, ) has finite height if each each chain in it is finite. (D, ) has bounded height if there exists k such that each chain in D has height at most k (i.e. number of elements in each chain is at most k + 1.)

Monotonicity, distributivity, and continuity f is monotone: x y = f (x) f (y). f is distributive: f (x y) = f (x) f (y). f is continuous: For any asc chain X : f ( X ) = (f (X )). Monotonic Distributive f is inf distributive: For any X D: f ( X ) = (f (X )). Continuous Inf Distributive

Characterising lfp s and gfp s of a function f in a complete lattice (D, ) f is continuous if for any ascending chain X in D, f ( X ) = (f (X )). If f is continuous then lfp(f ) = i 0(f i ( )). g If f is monotonic and (D, ) has finite height then we can compute lfp(f ) by finding the stable value of the asc. chain f ( ) f 2 ( ) f 3 ( ). Pre l (f i ( )) f (f ( )) f ( ) (D, )