Order Theory, Galois Connections and Abstract Interpretation

Similar documents
Notes on Ordered Sets

Sets and Motivation for Boolean algebra

(Pre-)Algebras for Linguistics

Notes on Abstract Interpretation

Galois Connections. Roland Backhouse 3rd December, 2002

Lattices and Orders in Isabelle/HOL

Discrete Fixpoint Approximation Methods in Program Static Analysis

Properties of Boolean Algebras

Proving Fixed Points

Closure operators on sets and algebraic lattices

Tree sets. Reinhard Diestel

Fields and Galois Theory. Below are some results dealing with fields, up to and including the fundamental theorem of Galois theory.

COMPLETE LATTICES. James T. Smith San Francisco State University

Universal Algebra for Logics

Foundations of mathematics. 5. Galois connections

GENERALIZED DIFFERENCE POSETS AND ORTHOALGEBRAS. 0. Introduction

Algebraic General Topology. Volume 1. Victor Porton. address: URL:

Commutative Algebra Lecture 3: Lattices and Categories (Sept. 13, 2013)

Lecture 1s Isomorphisms of Vector Spaces (pages )

«Mathematical foundations: (6) Abstraction Part II» Exact fixpoint abstraction. Property transformer abstraction

Postulate 2 [Order Axioms] in WRW the usual rules for inequalities

Introduction to Topology

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Introduction to Abstract Interpretation. ECE 584 Sayan Mitra Lecture 18

ClC (X ) : X ω X } C. (11)

Scott Taylor 1. EQUIVALENCE RELATIONS. Definition 1.1. Let A be a set. An equivalence relation on A is a relation such that:

Relations. Relations. Definition. Let A and B be sets.

Discrete Structures: Solutions to Sample Questions, Exam 2

A Logician s Toolbox

We have been going places in the car of calculus for years, but this analysis course is about how the car actually works.

CATEGORY THEORY. Cats have been around for 70 years. Eilenberg + Mac Lane =. Cats are about building bridges between different parts of maths.

Boolean Algebras. Chapter 2

Adjunctions! Everywhere!

An Introduction to the Theory of Lattice

Algebraic duality for partially ordered sets

Appendix A. Definitions for Ordered Sets. The appendices contain all the formal definitions, propositions and proofs for

Abstraction in Program Analysis & Model Checking. Abstraction in Model Checking. Motivations & Results

Cardinality and ordinal numbers

Modal-Like Operators in Boolean Lattices, Galois Connections and Fixed Points

Cantor-Bendixson, socle, and atomicity H. Simmons

Class Notes on Poset Theory Johan G. Belinfante Revised 1995 May 21

Lecture 2. Least Fixed Points

2. Prime and Maximal Ideals

Lecture 1: Lattice(I)

2MA105 Algebraic Structures I

Silvio Valentini Dip. di Matematica - Università di Padova

Lattice Theory Lecture 5. Completions

CHAPTER 3: THE INTEGERS Z

Topology Proceedings. COPYRIGHT c by Topology Proceedings. All rights reserved.

Algebraic Geometry

Lecture 7: Relations

Synthetic Geometry. 1.4 Quotient Geometries

Unless otherwise specified, V denotes an arbitrary finite-dimensional vector space.

Foundations of the PF relational calculus

FOUNDATIONS OF ALGEBRAIC GEOMETRY CLASS 43

where m is the maximal ideal of O X,p. Note that m/m 2 is a vector space. Suppose that we are given a morphism

Chapter 1. Sets and Numbers

Foundations of Mathematics

Part II. Logic and Set Theory. Year

Boolean Inner-Product Spaces and Boolean Matrices

Binary Relation Review Questions

55 Separable Extensions

Universität Augsburg

NOTES ON SPLITTING FIELDS

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Clones (3&4) Martin Goldstern. TACL Olomouc, June Discrete Mathematics and Geometry, TU Wien

Lecture Notes: Selected Topics in Discrete Structures. Ulf Nilsson

Filters on posets and generalizations

Is g one-to-one? Is g onto? Why? Solution: g is not one-to-one, since for c A, g(b) = g(c) = c. g is not onto, since a / g(a).

Real Analysis. Joe Patten August 12, 2018

The role of the overlap relation in constructive mathematics

Relations, Functions, Binary Relations (Chapter 1, Sections 1.2, 1.3)

Notes on ordinals and cardinals

Partial model checking via abstract interpretation

Galois Theory, summary

1 Rings 1 RINGS 1. Theorem 1.1 (Substitution Principle). Let ϕ : R R be a ring homomorphism

(1) A frac = b : a, b A, b 0. We can define addition and multiplication of fractions as we normally would. a b + c d

1 Fields and vector spaces

Coding theory: algebraic geometry of linear algebra David R. Kohel

Applications of Regular Algebra to Language Theory Problems. Roland Backhouse February 2001

0.2 Vector spaces. J.A.Beachy 1

Theorems. Theorem 1.11: Greatest-Lower-Bound Property. Theorem 1.20: The Archimedean property of. Theorem 1.21: -th Root of Real Numbers

Contents Ordered Fields... 2 Ordered sets and fields... 2 Construction of the Reals 1: Dedekind Cuts... 2 Metric Spaces... 3

Supplement. Algebraic Closure of a Field

Partial, Total, and Lattice Orders in Group Theory

Universität Augsburg. Institut für Informatik. Separability in Domain Semirings. D Augsburg. Report Dezember 2004

A Non-Topological View of Dcpos as Convergence Spaces

Basics of Relation Algebra. Jules Desharnais Département d informatique et de génie logiciel Université Laval, Québec, Canada

Relations on Hypergraphs

HOMOLOGY THEORIES INGRID STARKEY

Physical justification for using the tensor product to describe two quantum systems as one joint system

MAIN THEOREM OF GALOIS THEORY

Lattices, closure operators, and Galois connections.

Relations. Carl Pollard. October 11, Department of Linguistics Ohio State University

Set Basics. P. Danziger

The Logic of Partitions

Category theory and set theory: algebraic set theory as an example of their interaction

Recursive definitions on surreal numbers

Cross Connection of Boolean Lattice

Transcription:

Order Theory, and Abstract Interpretation David Henriques Carnegie Mellon University November 7th 2011 David Henriques Order Theory 1/ 40

Order Theory David Henriques Order Theory 2/ 40

Orders are everywhere 0 1 and 1 10 23 Two cousins have a common grandfather 22/7 is a worse approximation of π than 3.141592654 aardvark comes before zyzzyva a seraphim ranks above an angel rock beats scissors neither {1, 2, 4} or {2, 3, 5} are subsets of one another, but both are subsets of {1, 2, 3, 4, 5} David Henriques Order Theory 3/ 40

Orders are everywhere 0 1 and 1 10 23 Two cousins have a common grandfather 22/7 is a worse approximation of π than 3.141592654 aardvark comes before zyzzyva a seraphim ranks above an angel rock beats scissors neither {1, 2, 4} or {2, 3, 5} are subsets of one another, but both are subsets of {1, 2, 3, 4, 5} Actually, there is an intruder in this list. Can you spot it? David Henriques Order Theory 3/ 40

Orders are everywhere 0 1 and 1 10 23 Two cousins have a common grandfather 22/7 is a worse approximation of π than 3.141592654 aardvark comes before zyzzyva a seraphim ranks above an angel rock beats scissors neither {1, 2, 4} or {2, 3, 5} are subsets of one another, but both are subsets of {1, 2, 3, 4, 5} Actually, there is an intruder in this list. Can you spot it? It s not easy, we need a formal treatment of order! David Henriques Order Theory 3/ 40

What should we require from an order? Partial Order Let S be a set. A relation in S is said to be a partial order relation if it has the following properties if a b and b a then b = a (anti-symmetry) if a b and b c then a c (transitivity) a a (reflexivity) The pair (S, ) is said to be a partial order. David Henriques Order Theory 4/ 40

What should we require from an order? Partial Order Let S be a set. A relation in S is said to be a partial order relation if it has the following properties if a b and b a then b = a (anti-symmetry) if a b and b c then a c (transitivity) a a (reflexivity) The pair (S, ) is said to be a partial order. Why these properties? David Henriques Order Theory 4/ 40

What should we require from an order? Partial Order Let S be a set. A relation in S is said to be a partial order relation if it has the following properties if a b and b a then b = a (anti-symmetry) if a b and b c then a c (transitivity) a a (reflexivity) The pair (S, ) is said to be a partial order. Why these properties? they correspond to intuitive notions of order structures that share these properties have a lot of common behavior David Henriques Order Theory 4/ 40

- Natural Numbers (N, ) David Henriques Order Theory 5/ 40

- Natural Numbers (N, ) if a b and b a then a = b David Henriques Order Theory 5/ 40

- Natural Numbers (N, ) if a b and b a then a = b if a b and b c then a c David Henriques Order Theory 5/ 40

- Natural Numbers (N, ) if a b and b a then a = b if a b and b c then a c a a David Henriques Order Theory 5/ 40

- Natural Numbers (N, ) if a b and b a then a = b if a b and b c then a c a a Well... this was not very informative David Henriques Order Theory 5/ 40

- Rock, paper, scissors ({,, }, beats ) David Henriques Order Theory 6/ 40

- Rock, paper, scissors ({,, }, beats ) We don t have that beats David Henriques Order Theory 6/ 40

- Rock, paper, scissors Let s try again ({,, }, is not beaten by ) David Henriques Order Theory 7/ 40

- Rock, paper, scissors Let s try again ({,, }, is not beaten by ) It s reflexive (e.g. is not beaten by ) David Henriques Order Theory 7/ 40

- Rock, paper, scissors Let s try again ({,, }, is not beaten by ) It s reflexive (e.g. is not beaten by ) It s antisymmetric (e.g. is not beaten by means we can t heave is not beaten by ) David Henriques Order Theory 7/ 40

- Rock, paper, scissors Let s try again ({,, }, is not beaten by ) It s reflexive (e.g. is not beaten by ) It s antisymmetric (e.g. is not beaten by means we can t heave is not beaten by ) It s NOT transitive ( is not beaten by is not beaten by. But We don t have that is not beaten by ) David Henriques Order Theory 7/ 40

- Subset inclusion (P(S), ) David Henriques Order Theory 8/ 40

- Subset inclusion (P(S), ) if P Q and P Q then P = Q David Henriques Order Theory 8/ 40

- Subset inclusion (P(S), ) if P Q and P Q then P = Q if P Q and Q R then P R David Henriques Order Theory 8/ 40

- Subset inclusion (P(S), ) if P Q and P Q then P = Q if P Q and Q R then P R P P David Henriques Order Theory 8/ 40

- Subset inclusion What about sets like {1, 2, 4} and {3, 4, 5}, which one is bigger? David Henriques Order Theory 9/ 40

- Subset inclusion What about sets like {1, 2, 4} and {3, 4, 5}, which one is bigger? Well... none In general, we don t require all elements to be comparable amongst themselves. David Henriques Order Theory 9/ 40

- Subset inclusion What about sets like {1, 2, 4} and {3, 4, 5}, which one is bigger? Well... none In general, we don t require all elements to be comparable amongst themselves. Total Order Let (S, ) be a partial order. Then (S, ) is called a total order if for all a, b S, a b or b a (totality) David Henriques Order Theory 9/ 40

- Subset inclusion induced orders Subset inclusion induces orderings in may algebraic structures David Henriques Order Theory 10/ 40

- Subset inclusion induced orders Subset inclusion induces orderings in may algebraic structures subgroup orderings (used in Galois Theory) subfield orderings (aka towers, also used in GT) subspaces (used in linear Algebra and Geometry) ideals of rings (used pretty much everywhere)... David Henriques Order Theory 10/ 40

Bounds, suprema, infima Let (S, ) be a partial order and P S. An element b S is said to be: an upper bound of P if p P, b b a lower bound of P if p P, b p the supremum of P if b is the least upper bound of P: b is u.b. of P and if b is an u.b. of P, b b the infimum of P if b is the greatest lower bound of P: b is l.b. of P and if b is a l.b. of P, b b David Henriques Order Theory 11/ 40

Meet and Join The functions that return suprema and infima are called, respectively, join and meet: meet and join : P(S) S, (P) = b, b infimum of P is the meet function. : P(S) S, (P) = b, b supremum of P is the join function. David Henriques Order Theory 12/ 40

Warning Suprema and infima are not guaranteed to exist! David Henriques Order Theory 13/ 40

Warning Suprema and infima are not guaranteed to exist! Fortunately, we will generally work in structures where meets and joins exist! David Henriques Order Theory 13/ 40

Lattices Lattice Let (S, ) be a partial order. (S, ) is a lattice if the meet and join of any pair of elements of S always exists. David Henriques Order Theory 14/ 40

Lattices Lattice Let (S, ) be a partial order. (S, ) is a lattice if the meet and join of any pair of elements of S always exists. Complte Lattice Let (S, ) be a partial order. (S, ) is a complete lattice if the meet and join of any subset of elements of S always exists. David Henriques Order Theory 14/ 40

Lattices Lattice Let (S, ) be a partial order. (S, ) is a lattice if the meet and join of any pair of elements of S always exists. Complte Lattice Let (S, ) be a partial order. (S, ) is a complete lattice if the meet and join of any subset of elements of S always exists. Top and Bottom Let (S, ) be a complete Lattice. Then = S is an u. b. of any subset of S and called the top of S = S is a l. b. of any subset of S and called the bottom of S David Henriques Order Theory 14/ 40

Monotonicity and Continuity Monotonicity and Continuity Let (S, ) be a complete lattice. Let f : S S be a function. We say f is monotonic if, for a b, then f (a) f (b) -continuous if, for every a 1 a 2..., then f ( a i ) = f (a i ) -continuous if, for every a 1 a 2..., then f ( a i ) = f (a i ) David Henriques Order Theory 15/ 40

An old f(r)iend revisited Tarski s fixed point lemma Let (S, ) be a complete lattice. Let f : S S be a monotonic function. Then the set of fixed points of f is also a complete lattice. In particular it has a top (the gfp of f) and a bottom (the lfp of f) David Henriques Order Theory 16/ 40

David Henriques Order Theory 17/ 40

Monotone Galois Connection Let X, and Y, be complete lattices. Let L : X Y and U : Y X. Then we say that ( X,, Y, ), L, U is a (monotone) Galois Connection if, for all x X, y Y : L(x) y iff x U(y) L is called the lower adjoint (of U) and U is called the upper adjoint (of L). David Henriques Order Theory 18/ 40

L(x) = Y David Henriques Order Theory 19/ 40

L(x) = Y, U(y) = X David Henriques Order Theory 19/ 40

L(x) = Y, U(y) = X X = 2N, Y = 2N + 1,L(x) = x + 1 David Henriques Order Theory 19/ 40

L(x) = Y, U(y) = X X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y 1 David Henriques Order Theory 19/ 40

L(x) = Y, U(y) = X X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y 1 X = 2N, Y = 2N + 1,L(x) = x + 3 David Henriques Order Theory 19/ 40

L(x) = Y, U(y) = X X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y 1 X = 2N, Y = 2N + 1,L(x) = x + 3, U(y) = y 3 David Henriques Order Theory 19/ 40

L(x) = Y, U(y) = X X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y 1 X = 2N, Y = 2N + 1,L(x) = x + 3, U(y) = y 3 X, Y, L is a bijective function,u = L 1 David Henriques Order Theory 19/ 40

- The Functional Abstraction Let S 1 and S 2 be sets, f : S 1 S 2 and Then L(A) = {f (a) a A} U(B) = {a f (a) B} is a Galois Connection. ( P(S 1 ),, P(S 2 ),, L, U) Proof: L(A) = {f (a) a A} B iff a A f (a) B iff A {a f (a) B} = U(B) David Henriques Order Theory 20/ 40

Why is this useful? David Henriques Order Theory 21/ 40

Duality Let X,, Y,, L, U be a Galois connection, Then Y,, X,, U, L is a Galois connection. Proof: L(x) y iff x U(y) U(y) x iff y L(x) David Henriques Order Theory 22/ 40

Composition Let X,, Y,, L 1, U 1 and Y,, Z,, L 2, U 2 be GCs. Then X,, Z,, L 2 L 1, U 1 U 2 is a GC Proof: L 2 (y) z iff y U 2 (z). Take y = L 1 (x). Then L 2 (L 1 (x)) z iff L 1 (x) U 2 (z) iff x U 1 (U 2 (z)) David Henriques Order Theory 23/ 40

Cancellation and Monotonicity Let X,, Y,, L, U be GC. Then 1. x U(L(x)) and L(U(y)) y 2. Both U and L are monotonic. Proof: 1. L(x) L(x) iff x U(L(x)) 2. x x 1 x U(L(x )) x U(L(x )) iff L(x) L(x ) David Henriques Order Theory 24/ 40

Preservation of Infima and Suprema Let X,, Y,, L, U be a GC. Then L preserves suprema and U preserves infima, i.e. L( X ) = L(X ) and U( Y ) = U(Y ) Proof: Let X x X. By monotonicity of L, L(x) L( X ) and L( X ) is therefore an upper bound of L(X ). Let y be another UB of L(X ). Then, for all x X, L(x) y iff, by def, x U(y). But then X U(y) iff, by def, L( X ) y, therefore L( X ) is the lowest upper bound of L(X ). David Henriques Order Theory 25/ 40

Existence Let X,, Y, and L : X Y such that L preserves suprema. Then there exists U s.t. X,, Y,, L, U is a GC. Proof: Let U = λy. {x : L(x) y}. L(x) y x {z : L(z) y} x {z : L(z) y} x U(y). x U(y) L(x) L( {z : L(z) y}) L(x) {L(z) : L(z) y} L(x) y L monotonic L preserves suprema David Henriques Order Theory 26/ 40

Transfer Theorem Let X,, Y, F : X X monotonic, F : Y Y monotonic and L : X Y preserving suprema. Then L F F L iff L(lfp[F ]) lfp[f ] David Henriques Order Theory 27/ 40

Fixpoint Approximation Theorem Let X,, Y, F : X X monotonic and L : X Y preserving suprema. Then, there is F : Y Y monotonic s.t. lfp[f ] U(lfp[F ]) where U is the upper adjoint of L. Proof : Take F = L F U. Apply the Transfer Theorem to get L(lfp[F ]) lfp[f ] Now apply U, which is continuous to both sides and get the result by Cancellation on the left. David Henriques Order Theory 28/ 40

References M. Erné, J. Koslowski, A. Melton and G.E. Strecker A primer on, York Academy of Science, 1992. P. Cousot and R. Cousot Galois Connection based abstract interpretations for strictness analysis, International Conference on Formal Methods in Programming and their Applications, 1993. R. Backhouse and Fixed Point Calculus, Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, 2002. David Henriques Order Theory 29/ 40

Time permitting How everything you ve ever seen was thought of by Galois! David Henriques Order Theory 30/ 40

n x iff n x David Henriques Order Theory 31/ 40

n x iff n x real(n) x iff n floor(x) David Henriques Order Theory 31/ 40

n x iff n x real(n) x iff n floor(x) x x David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x real(n) x iff n floor(x) David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x n n real(n) x iff n floor(x) David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x n n n n iff n n real(n) x iff n floor(x) David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x real(n) x iff n floor(x) n n n n n = n n n iff n n David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x real(n) x iff n floor(x) n n n n n = n n n iff n n x y x y David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x real(n) x iff n floor(x) n n n n n = n n n iff n n x y x y x y x x y x y David Henriques Order Theory 31/ 40

n x iff n x x x x x iff x x real(n) x iff n floor(x) n n n n n = n n n iff n n x y x y x y x x y x y x y iff x y David Henriques Order Theory 31/ 40

p q r iff q p r David Henriques Order Theory 32/ 40

p q r iff q p r X, Y = P, X,, Y,, L = (p.), U = (p.) David Henriques Order Theory 32/ 40

p q r iff q p r X, Y = P, X,, Y,, L = (p.), U = (p.) p q iff p q David Henriques Order Theory 32/ 40

p q r iff q p r X, Y = P, X,, Y,, L = (p.), U = (p.) p q iff p q X, Y = P, X,, Y,, L, U = (.) David Henriques Order Theory 32/ 40

p q r iff q p r X, Y = P, X,, Y,, L = (p.), U = (p.) p q iff p q X, Y = P, X,, Y,, L, U = (.) Given R A B P(A),, P(B),, L(M) = {b : arb, a M}, U(M) = {a : arb, b M} (antitone GC) David Henriques Order Theory 32/ 40

Given field K K[x 1,...x n ],, K n,, L(I ) = {x K n : f I.f (x) = 0}, U(V ) = {f K[x 1,...x n ] : x V.f (x) = 0} David Henriques Order Theory 33/ 40

Given field K K[x 1,...x n ],, K n,, L(I ) = {x K n : f I.f (x) = 0}, U(V ) = {f K[x 1,...x n ] : x V.f (x) = 0} Given mathematical structure M over set X L(S) = substructure generated by S (S X ) U(N) = underlying set of substructure N David Henriques Order Theory 33/ 40

Even more time permitting Fixed points, closures and isomorphisms David Henriques Order Theory 34/ 40

Order Isomorphisms An order isomorphism between X,, Y, is a surjective function h : X Y that is an order embedding, that is, h(x) h(x ) iff x x Order isomorphic posets can be considered to be essentially the same in the sense that one of them can be obtained from the other just by renaming of elements. David Henriques Order Theory 35/ 40

Some Lemmas Let X,, Y,, L, U be a GC. Then L(U(L(x))) = L(x) and U(L(U(y))) = U(y) Proof: ( ) By Cancellation, x U(L(x)). By monotonicity of L, L(x) L(U(L(x))). ( ) L(U(L(x))) L(x) iff U(L(x)) U(L(x)) by definition of GC. David Henriques Order Theory 36/ 40

Some Lemmas Let X,, Y,, L, U be a GC. Then x U(Y ) iff x is a fixed point of U L and y L(X ) iff y is a fixed point of L U. Proof: ( ) Let x U(Y ), then there is y s.t. x = U(y). Then U(L(x)) = U(L(U(y))) = U(y) = x, ie, x is a fixpoint of U L. ( ) Let x = U(L(x)), since L(x) Y, x U(Y ). David Henriques Order Theory 37/ 40

Some Lemmas Let X,, Y,, L, U be a GC. Then U(Y ) = U(L(X )) and L(X ) = L(U(Y )) Proof: ( ) x U(Y ) iff x = U(L(x)), that is x U(L(X )). ( ) x U(L(X )), then x = U(y) for some y L(X ) Y. So x U(Y ). David Henriques Order Theory 38/ 40

Finding Order Isomorphisms Let X,, Y,, L, U be a GC. Then U(L(X )),, L(U(Y )), are order isomorphic. Proof: U(L(X )), = U(Y ), and L(U(Y )), = L(X ),. L is the candidate isomorphism. L surjective onto L(X ) (from U(Y )): y L(X ) then y = L(x) for some x X then y = L(U(L(x))). But U(L(x)) U(Y ). David Henriques Order Theory 39/ 40

Finding Order Isomorphisms Let X,, Y,, L, U be a GC. Then U(L(X )),, L(U(Y )), are order isomorphic. Proof (contd): L is an order embedding: We already know L is monotonic. To prove: L(x) L(x ) x x. Let L(x) L(x ), then U(L(x)) U(L(x )). But since x, x U(Y ), U(L(x)) = x and U(L(x )) = x and thus x x. David Henriques Order Theory 40/ 40