<<

Galois Connections GC and Abstract Interpretation Examples

Order Theory, Galois Connections and Abstract Interpretation

David Henriques

Carnegie Mellon University

November 7th 2011

fsu-logo

David Henriques Order Theory 1/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples

Order Theory

fsu-logo

David Henriques Order Theory 2/ 40 It’s not easy, we need a formal treatment of order!

Actually, there is an intruder in this list. Can you spot it?

Order theory Galois Connections GC and Abstract Interpretation Examples Orders are everywhere

23 I 0 ≤ 1 and 1 ≤ 10

I Two cousins have a common grandfather

I 22/7 is a worse approximation of π than 3.141592654

I aardvark comes before zyzzyva

I a seraphim ranks above an angel

I rock beats scissors

I neither {1, 2, 4} or {2, 3, 5} are subsets of one another, but both are subsets of {1, 2, 3, 4, 5}

fsu-logo

David Henriques Order Theory 3/ 40 It’s not easy, we need a formal treatment of order!

Order theory Galois Connections GC and Abstract Interpretation Examples Orders are everywhere

23 I 0 ≤ 1 and 1 ≤ 10

I Two cousins have a common grandfather

I 22/7 is a worse approximation of π than 3.141592654

I aardvark comes before zyzzyva

I a seraphim ranks above an angel

I rock beats scissors

I 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?

fsu-logo

David Henriques Order Theory 3/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Orders are everywhere

23 I 0 ≤ 1 and 1 ≤ 10

I Two cousins have a common grandfather

I 22/7 is a worse approximation of π than 3.141592654

I aardvark comes before zyzzyva

I a seraphim ranks above an angel

I rock beats scissors

I 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! fsu-logo

David Henriques Order Theory 3/ 40 I they correspond to intuitive notions of order

I structures that share these properties have a lot of common behavior

Why these properties?

Order theory Galois Connections GC and Abstract Interpretation Examples What should we require from an order?

Partial Order Let S be a . A relation v in S is said to be a partial order relation if it has the following properties

I if a v b and b v a then b = a (anti-symmetry)

I if a v b and b v c then a v c (transitivity)

I a v a (reflexivity) The pair (S, v) is said to be a partial order.

fsu-logo

David Henriques Order Theory 4/ 40 I they correspond to intuitive notions of order

I structures that share these properties have a lot of common behavior

Order theory Galois Connections GC and Abstract Interpretation Examples What should we require from an order?

Partial Order Let S be a set. A relation v in S is said to be a partial order relation if it has the following properties

I if a v b and b v a then b = a (anti-symmetry)

I if a v b and b v c then a v c (transitivity)

I a v a (reflexivity) The pair (S, v) is said to be a partial order.

Why these properties?

fsu-logo

David Henriques Order Theory 4/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples What should we require from an order?

Partial Order Let S be a set. A relation v in S is said to be a partial order relation if it has the following properties

I if a v b and b v a then b = a (anti-symmetry)

I if a v b and b v c then a v c (transitivity)

I a v a (reflexivity) The pair (S, v) is said to be a partial order.

Why these properties?

I they correspond to intuitive notions of order

I structures that share these properties have a lot of common fsu-logo behavior

David Henriques Order Theory 4/ 40 I a ≤ a

I if a ≤ b and b ≤ c then a ≤ c

I if a ≤ b and b ≤ a then a = b

Well... this was not very informative

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Natural Numbers

(N, ≤)

fsu-logo

David Henriques Order Theory 5/ 40 I a ≤ a

I if a ≤ b and b ≤ c then a ≤ c

Well... this was not very informative

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Natural Numbers

(N, ≤)

I if a ≤ b and b ≤ a then a = b

fsu-logo

David Henriques Order Theory 5/ 40 I a ≤ a

Well... this was not very informative

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Natural Numbers

(N, ≤)

I if a ≤ b and b ≤ a then a = b

I if a ≤ b and b ≤ c then a ≤ c

fsu-logo

David Henriques Order Theory 5/ 40 Well... this was not very informative

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Natural Numbers

(N, ≤)

I if a ≤ b and b ≤ a then a = b

I if a ≤ b and b ≤ c then a ≤ c

I a ≤ a

fsu-logo

David Henriques Order Theory 5/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Natural Numbers

(N, ≤)

I if a ≤ b and b ≤ a then a = b

I if a ≤ b and b ≤ c then a ≤ c

I a ≤ a

Well... this was not very informative

fsu-logo

David Henriques Order Theory 5/ 40 I We don’t have that  beats 

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Rock, paper, scissors

({, ¤, }, “beats”)

fsu-logo

David Henriques Order Theory 6/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Rock, paper, scissors

({, ¤, }, “beats”)

I We don’t have that  beats 

fsu-logo

David Henriques Order Theory 6/ 40 I It’s NOT transitive ( is not beaten by ¤ is not beaten by  . But We don’t have that  is not beaten by )

I It’s antisymmetric (e.g.  is not beaten by ¤ means we can’t heave ¤ is not beaten by )

I It’s reflexive (e.g.  is not beaten by )

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Rock, paper, scissors

Let’s try again ({, ¤, }, “is not beaten by”)

fsu-logo

David Henriques Order Theory 7/ 40 I It’s NOT transitive ( is not beaten by ¤ is not beaten by  . But We don’t have that  is not beaten by )

I It’s antisymmetric (e.g.  is not beaten by ¤ means we can’t heave ¤ is not beaten by )

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Rock, paper, scissors

Let’s try again ({, ¤, }, “is not beaten by”)

I It’s reflexive (e.g.  is not beaten by )

fsu-logo

David Henriques Order Theory 7/ 40 I It’s NOT transitive ( is not beaten by ¤ is not beaten by  . But We don’t have that  is not beaten by )

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Rock, paper, scissors

Let’s try again ({, ¤, }, “is not beaten by”)

I It’s reflexive (e.g.  is not beaten by )

I It’s antisymmetric (e.g.  is not beaten by ¤ means we can’t heave ¤ is not beaten by )

fsu-logo

David Henriques Order Theory 7/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Rock, paper, scissors

Let’s try again ({, ¤, }, “is not beaten by”)

I It’s reflexive (e.g.  is not beaten by )

I It’s antisymmetric (e.g.  is not beaten by ¤ means we can’t heave ¤ is not beaten by )

I It’s NOT transitive ( is not beaten by ¤ is not beaten by  . But We don’t have that  is not beaten by )

fsu-logo

David Henriques Order Theory 7/ 40 I P ⊆ P

I if P ⊆ Q and Q ⊆ R then P ⊆ R

I if P ⊆ Q and P ⊆ Q then P = Q

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion

(P(S), ⊆)

fsu-logo

David Henriques Order Theory 8/ 40 I P ⊆ P

I if P ⊆ Q and Q ⊆ R then P ⊆ R

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion

(P(S), ⊆)

I if P ⊆ Q and P ⊆ Q then P = Q

fsu-logo

David Henriques Order Theory 8/ 40 I P ⊆ P

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion

(P(S), ⊆)

I if P ⊆ Q and P ⊆ Q then P = Q

I if P ⊆ Q and Q ⊆ R then P ⊆ R

fsu-logo

David Henriques Order Theory 8/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion

(P(S), ⊆)

I if P ⊆ Q and P ⊆ Q then P = Q

I if P ⊆ Q and Q ⊆ R then P ⊆ R

I P ⊆ P

fsu-logo

David Henriques Order Theory 8/ 40 Total Order Let (S, v) be a partial order. Then (S, v) is called a total order if

I for all a, b ∈ S, a v b or b v a (totality)

Well... none In general, we don’t require all elements to be comparable amongst themselves.

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion

What about sets like {1, 2, 4} and {3, 4, 5}, which one is “bigger”?

fsu-logo

David Henriques Order Theory 9/ 40 Total Order Let (S, v) be a partial order. Then (S, v) is called a total order if

I for all a, b ∈ S, a v b or b v a (totality)

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - 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.

fsu-logo

David Henriques Order Theory 9/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - 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, v) be a partial order. Then (S, v) is called a total order if

I for all a, b ∈ S, a v b or b v a (totality)

fsu-logo

David Henriques Order Theory 9/ 40 I orderings (used in )

I subfield orderings (aka towers, also used in GT)

I subspaces (used in linear Algebra and Geometry)

I ideals of rings (used pretty much everywhere)

I ...

Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion induced orders

Subset inclusion induces orderings in may algebraic structures

fsu-logo

David Henriques Order Theory 10/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - Subset inclusion induced orders

Subset inclusion induces orderings in may algebraic structures

I subgroup orderings (used in Galois Theory)

I subfield orderings (aka towers, also used in GT)

I subspaces (used in linear Algebra and Geometry)

I ideals of rings (used pretty much everywhere)

I ...

fsu-logo

David Henriques Order Theory 10/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Bounds, suprema, infima

Let (S, v) be a partial order and P ⊆ S. An element b ∈ S is said to be:

I an upper bound of P if ∀p ∈ P, b v b

I a lower bound of P if ∀p ∈ P, b v p

I the supremum of P if b is the least upper bound of P: b is u.b. of P and if b0 is an u.b. of P, b v b0

I the infimum of P if b is the greatest lower bound of P: b is l.b. of P and if b0 is a l.b. of P, b0 v b

fsu-logo

David Henriques Order Theory 11/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Meet and Join

The functions that return suprema and infima are called, respectively, join and meet: meet and join V V I : P(S) → S, (P) = b, b infimum of P is the meet . W W I : P(S) → S, (P) = b, b supremum of P is the join function.

fsu-logo

David Henriques Order Theory 12/ 40 Fortunately, we will generally work in structures where meets and joins exist!

Order theory Galois Connections GC and Abstract Interpretation Examples Warning

Suprema and infima are not guaranteed to exist!

fsu-logo

David Henriques Order Theory 13/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Warning

Suprema and infima are not guaranteed to exist!

Fortunately, we will generally work in structures where meets and joins exist!

fsu-logo

David Henriques Order Theory 13/ 40 Complte Let (S, v) be a partial order. (S, v) is a if the meet and join of any subset of elements of S always exists. Top and Bottom Let (S, v) be a complete Lattice. Then W I > = S is an u. b. of any subset of S and called the top of S V I ⊥ = S is a l. b. of any subset of S and called the bottom of S

Order theory Galois Connections GC and Abstract Interpretation Examples Lattices

Lattice Let (S, v) be a partial order. (S, v) is a lattice if the meet and join of any pair of elements of S always exists.

fsu-logo

David Henriques Order Theory 14/ 40 Top and Bottom Let (S, v) be a complete Lattice. Then W I > = S is an u. b. of any subset of S and called the top of S V I ⊥ = S is a l. b. of any subset of S and called the bottom of S

Order theory Galois Connections GC and Abstract Interpretation Examples Lattices

Lattice Let (S, v) be a partial order. (S, v) is a lattice if the meet and join of any pair of elements of S always exists. Complte Lattice Let (S, v) be a partial order. (S, v) is a complete lattice if the meet and join of any subset of elements of S always exists.

fsu-logo

David Henriques Order Theory 14/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Lattices

Lattice Let (S, v) be a partial order. (S, v) is a lattice if the meet and join of any pair of elements of S always exists. Complte Lattice Let (S, v) be a partial order. (S, v) is a complete lattice if the meet and join of any subset of elements of S always exists. Top and Bottom Let (S, v) be a complete Lattice. Then W I > = S is an u. b. of any subset of S and called the top of S V I ⊥ = S is a l. b. of any subset of S and called the bottom fsu-logo of S

David Henriques Order Theory 14/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Monotonicity and Continuity

Monotonicity and Continuity Let (S, v) be a complete lattice. Let f : S → S be a function. We say f is

I monotonic if, for a v b, then f (a) v f (b) W I -continuous if, for every a1 v a2 v ..., then W W f ( ai ) = f (ai ) V I -continuous if, for every a1 w a2 w ..., then V V f ( ai ) = f (ai )

fsu-logo

David Henriques Order Theory 15/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples An old f(r)iend revisited

Tarski’s fixed point lemma Let (S, v) be a complete lattice. Let f : S → S be a . 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)

fsu-logo

David Henriques Order Theory 16/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples

Galois Connections

fsu-logo

David Henriques Order Theory 17/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Monotone Galois Connection

Let hX , ≤i and hY , vi be complete lattices. Let L : X → Y and U : Y → X . Then we say that (hX , ≤i, hY , vi), L, U is a (monotone) Galois Connection if, for all x ∈ X , y ∈ Y :

L(x) v y iff x ≤ U(y) L is called the lower adjoint (of U) and U is called the upper adjoint (of L).

fsu-logo

David Henriques Order Theory 18/ 40 , U(y) = y − 1

, U(y) = y − 3

, U(y) = >X

I X = 2N, Y = 2N + 1,L(x) = x + 1

I X = 2N, Y = 2N + 1,L(x) = x + 3

−1 I X , Y , L is a bijective function,U = L

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y

fsu-logo

David Henriques Order Theory 19/ 40 , U(y) = y − 1

, U(y) = y − 3

I X = 2N, Y = 2N + 1,L(x) = x + 1

I X = 2N, Y = 2N + 1,L(x) = x + 3

−1 I X , Y , L is a bijective function,U = L

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y , U(y) = >X

fsu-logo

David Henriques Order Theory 19/ 40 , U(y) = y − 3

, U(y) = y − 1

I X = 2N, Y = 2N + 1,L(x) = x + 3

−1 I X , Y , L is a bijective function,U = L

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y , U(y) = >X

I X = 2N, Y = 2N + 1,L(x) = x + 1

fsu-logo

David Henriques Order Theory 19/ 40 , U(y) = y − 3

I X = 2N, Y = 2N + 1,L(x) = x + 3

−1 I X , Y , L is a bijective function,U = L

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y , U(y) = >X

I X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y − 1

fsu-logo

David Henriques Order Theory 19/ 40 , U(y) = y − 3

−1 I X , Y , L is a bijective function,U = L

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y , U(y) = >X

I X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y − 1

I X = 2N, Y = 2N + 1,L(x) = x + 3

fsu-logo

David Henriques Order Theory 19/ 40 −1 I X , Y , L is a bijective function,U = L

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y , U(y) = >X

I X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y − 1

I X = 2N, Y = 2N + 1,L(x) = x + 3, U(y) = y − 3

fsu-logo

David Henriques Order Theory 19/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I L(x) = ⊥Y , U(y) = >X

I X = 2N, Y = 2N + 1,L(x) = x + 1, U(y) = y − 1

I X = 2N, Y = 2N + 1,L(x) = x + 3, U(y) = y − 3

−1 I X , Y , L is a bijective function,U = L

fsu-logo

David Henriques Order Theory 19/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples - The Functional Abstraction

Let S1 and S2 be sets, f : S1 → S2 and

L(A) = {f (a)|a ∈ A} U(B) = {a|f (a) ∈ B}

Then (hP(S1), ⊆i, hP(S2), ⊆i, L, U) is a Galois Connection.

Proof: L(A) = {f (a)|a ∈ A} ⊆ B iff ∀a∈Af (a) ∈ B iff A ⊆ {a|f (a) ∈ B} = U(B)

fsu-logo

David Henriques Order Theory 20/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Why is this useful?

fsu-logo

David Henriques Order Theory 21/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples

Let hX , ≤i, hY , vi, L, U be a Galois connection, Then hY , wi, hX , ≥i, U, L is a Galois connection.

Proof: L(x) v y iff x ≤ U(y) ⇔ U(y) ≥ x iff y w L(x)

fsu-logo

David Henriques Order Theory 22/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Composition

Let hX , ≤i, hY , vi, L1, U1 and hY , vi, hZ, i, L2, U2 be GCs. Then hX , ≤i, hZ, i, L2 ◦ L1, U1 ◦ U2 is a GC

Proof: L2(y)  z iff y v U2(z). Take y = L1(x). Then L2(L1(x))  z iff L1(x) v U2(z) iff x ≤ U1(U2(z))

fsu-logo

David Henriques Order Theory 23/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Cancellation and Monotonicity

Let hX , ≤i, hY , vi, L, U be GC. Then 1. x ≤ U(L(x)) and L(U(y)) v y 2. Both U and L are monotonic.

Proof: 1. L(x) v L(x) iff x ≤ U(L(x)) 0 0 2. x ≤ x ⇒1 x ≤ U(L(x )) x ≤ U(L(x0)) iff L(x) v L(x0)

fsu-logo

David Henriques Order Theory 24/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Preservation of Infima and Suprema

Let hX , ≤i, hY , vi, L, U be a GC. Then L preserves suprema and U preserves infima, i.e. _ G ^ L( X 0) = L(X 0) and U( Y 0) = l U(Y 0)

Proof: Let X 0 3 x ≤ W X 0. By monotonicity of L, L(x) v L(W X 0) and L(W X 0) is therefore an upper bound of L(X 0). Let y be another UB of L(X 0). Then, for all x ∈ X 0, L(x) v y iff, by def, x ≤ U(y). But then W X 0 ≤ U(y) iff, by def, L(W X 0) v y, therefore L(W X 0) is the lowest upper bound of L(X 0). fsu-logo

David Henriques Order Theory 25/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Existence

Let hX , ≤i, hY , vi and L : X → Y such that L preserves suprema. Then there exists U s.t. hX , ≤i, hY , vi, L, U is a GC.

Proof: Let U = λy. W{x : L(x) v y}.

L(x) v y ⇒ x ∈ {z : L(z) v y} ⇒ x ≤ W{z : L(z) v y} ⇔ x ≤ U(y).

x ≤ U(y) ⇒ L(x) v L(W{z : L(z) v y}) L monotonic ⇒ L(x) v F{L(z): L(z) v y} L preserves suprema ⇒ L(x) v y fsu-logo

David Henriques Order Theory 26/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Transfer Theorem

Let hX , ≤i,hY , vi F : X → X monotonic, F 0 : Y → Y monotonic and L : X → Y preserving suprema.

Then L ◦ F v F 0 ◦ L iff L(lfp[F ]) v lfp[F 0]

fsu-logo

David Henriques Order Theory 27/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Fixpoint Approximation Theorem

Let hX , ≤i,hY , vi F : X → X monotonic and L : X → Y preserving suprema.

Then, there is F 0 : Y → Y monotonic s.t.

lfp[F ] ≤ U(lfp[F 0])

where U is the upper adjoint of L.

“Proof”: Take F 0 = L ◦ F ◦ U. Apply the Transfer Theorem to get

L(lfp[F ]) v lfp[F 0]

Now apply U, which is continuous to both sides and get the result fsu-logo by Cancellation on the left.

David Henriques Order Theory 28/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples References

M. Ern´e,J. Koslowski, A. Melton and G.E. Strecker A primer on Galois Connections, 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 Galois Connections and Fixed Point Calculus, Algebraic and Coalgebraic Methods in the Mathematics of fsu-logo Program Construction, 2002.

David Henriques Order Theory 29/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples

Time permitting

How everything you’ve ever seen was thought of by Galois!

fsu-logo

David Henriques Order Theory 30/ 40 ∧ bnc ≤ n ⇔ n = bnc

x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

fsu-logo

David Henriques Order Theory 31/ 40 ∧ bnc ≤ n ⇔ n = bnc

x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

fsu-logo

David Henriques Order Theory 31/ 40 ∧ bnc ≤ n ⇔ n = bnc

x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

bxc ≤ bxc iff bxc ≤ x n ≤ bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x

fsu-logo

David Henriques Order Theory 31/ 40 ∧ bnc ≤ n ⇔ n = bnc

x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

n ≤ bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x

fsu-logo

David Henriques Order Theory 31/ 40 x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

∧ bnc ≤ n ⇔ n = bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc

fsu-logo

David Henriques Order Theory 31/ 40 x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

∧ bnc ≤ n ⇔ n = bnc

x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc n ≤ bnc iff n ≤ n

fsu-logo

David Henriques Order Theory 31/ 40 x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

x ≤ y ⇒ bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc ∧ bnc ≤ n ⇔ n = bnc n ≤ bnc iff n ≤ n

fsu-logo

David Henriques Order Theory 31/ 40 x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y bxc ≤ y iff bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc ∧ bnc ≤ n ⇔ n = bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

fsu-logo

David Henriques Order Theory 31/ 40 bxc ≤ y iff bxc ≤ byc

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc ∧ bnc ≤ n ⇔ n = bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y fsu-logo

David Henriques Order Theory 31/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples

n ≤ bxc iff n ≤ x

real(n) ≤ x iff n ≤ floor(x)

bxc ≤ x bxc ≤ bxc iff bxc ≤ x n ≤ bnc ∧ bnc ≤ n ⇔ n = bnc n ≤ bnc iff n ≤ n x ≤ y ⇒ bxc ≤ byc

x ≤ y ⇒ bxc ≤ x ≤ y ⇒ bxc ≤ y fsu-logo bxc ≤ y iff bxc ≤ byc

David Henriques Order Theory 31/ 40 X , Y = P, hX , ⇐i, hY , ⇒i, L, U = ¬(.)

X , Y = P, hX , ⇒i, hY , ⇒i, L = (p ∧ .), U = (p ⇒ .)

I ¬p ⇒ q iff p ⇐ ¬q

I Given R ⊆ A × B hP(A), ⊆i, hP(B), ⊆i, L(M) = {b : aRb, a ∈ M}, U(M) = {a : aRb, b ∈ M} (antitone GC)

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I p ∧ q ⇒ r iff q ⇒ p ⇒ r

fsu-logo

David Henriques Order Theory 32/ 40 X , Y = P, hX , ⇐i, hY , ⇒i, L, U = ¬(.)

I ¬p ⇒ q iff p ⇐ ¬q

I Given R ⊆ A × B hP(A), ⊆i, hP(B), ⊆i, L(M) = {b : aRb, a ∈ M}, U(M) = {a : aRb, b ∈ M} (antitone GC)

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I p ∧ q ⇒ r iff q ⇒ p ⇒ r X , Y = P, hX , ⇒i, hY , ⇒i, L = (p ∧ .), U = (p ⇒ .)

fsu-logo

David Henriques Order Theory 32/ 40 X , Y = P, hX , ⇐i, hY , ⇒i, L, U = ¬(.)

I Given R ⊆ A × B hP(A), ⊆i, hP(B), ⊆i, L(M) = {b : aRb, a ∈ M}, U(M) = {a : aRb, b ∈ M} (antitone GC)

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I p ∧ q ⇒ r iff q ⇒ p ⇒ r X , Y = P, hX , ⇒i, hY , ⇒i, L = (p ∧ .), U = (p ⇒ .)

I ¬p ⇒ q iff p ⇐ ¬q

fsu-logo

David Henriques Order Theory 32/ 40 I Given R ⊆ A × B hP(A), ⊆i, hP(B), ⊆i, L(M) = {b : aRb, a ∈ M}, U(M) = {a : aRb, b ∈ M} (antitone GC)

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I p ∧ q ⇒ r iff q ⇒ p ⇒ r X , Y = P, hX , ⇒i, hY , ⇒i, L = (p ∧ .), U = (p ⇒ .)

I ¬p ⇒ q iff p ⇐ ¬q X , Y = P, hX , ⇐i, hY , ⇒i, L, U = ¬(.)

fsu-logo

David Henriques Order Theory 32/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I p ∧ q ⇒ r iff q ⇒ p ⇒ r X , Y = P, hX , ⇒i, hY , ⇒i, L = (p ∧ .), U = (p ⇒ .)

I ¬p ⇒ q iff p ⇐ ¬q X , Y = P, hX , ⇐i, hY , ⇒i, L, U = ¬(.)

I Given R ⊆ A × B hP(A), ⊆i, hP(B), ⊆i, L(M) = {b : aRb, a ∈ M}, U(M) = {a : aRb, b ∈ M} (antitone GC)

fsu-logo

David Henriques Order Theory 32/ 40 I Given mathematical structure M over set X L(S) = substructure generated by S (S ⊆ X ) U(N) = underlying set of substructure N

Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I Given field K n hK[x1, ...xn], ⊆i, hK , ⊆i, L(I ) = {x ∈ K n : ∀f ∈ I .f (x) = 0}, U(V ) = {f ∈ K[x1, ...xn]: ∀x ∈ V .f (x) = 0}

fsu-logo

David Henriques Order Theory 33/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Examples

I Given field K n hK[x1, ...xn], ⊆i, hK , ⊆i, L(I ) = {x ∈ K n : ∀f ∈ I .f (x) = 0}, U(V ) = {f ∈ K[x1, ...xn]: ∀x ∈ V .f (x) = 0}

I Given mathematical structure M over set X L(S) = substructure generated by S (S ⊆ X ) U(N) = underlying set of substructure N

fsu-logo

David Henriques Order Theory 33/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples

Even more time permitting

Fixed points, closures and isomorphisms

fsu-logo

David Henriques Order Theory 34/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Order Isomorphisms

An between hX , ≤i,hY , vi is a surjective function h : X → Y that is an , that is,

h(x) v h(x0) iff x ≤ x0

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.

fsu-logo

David Henriques Order Theory 35/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Some Lemmas

Let hX , ≤i, hY , vi, L, U be a GC.

Then

L(U(L(x))) = L(x) and U(L(U(y))) = U(y)

Proof: (v) By Cancellation, x ≤ U(L(x)). By monotonicity of L, L(x) v L(U(L(x))). (w) L(U(L(x))) v L(x) iff U(L(x)) ≤ U(L(x)) by definition of GC. fsu-logo

David Henriques Order Theory 36/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Some Lemmas

Let hX , ≤i, hY , vi, 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 ).

fsu-logo

David Henriques Order Theory 37/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Some Lemmas

Let hX , ≤i, hY , vi, 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 ).

fsu-logo

David Henriques Order Theory 38/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Finding Order Isomorphisms

Let hX , ≤i, hY , vi, L, U be a GC.

Then hU(L(X )), ≤i, hL(U(Y )), vi are order isomorphic.

Proof: hU(L(X )), ≤i = hU(Y ), ≤i and hL(U(Y )), vi = hL(X ), vi. 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 ).

fsu-logo

David Henriques Order Theory 39/ 40 Order theory Galois Connections GC and Abstract Interpretation Examples Finding Order Isomorphisms

Let hX , ≤i, hY , vi, L, U be a GC.

Then hU(L(X )), ≤i, hL(U(Y )), vi are order isomorphic.

Proof (contd): L is an order embedding: We already know L is monotonic. To prove: L(x) v L(x0) ⇒ x ≤ x0. Let L(x) v L(x0), then U(L(x)) ≤ U(L(x0)). But since x, x0 ∈ U(Y ), U(L(x)) = x and U(L(x0)) = x0 and thus x ≤ x0.

fsu-logo

David Henriques Order Theory 40/ 40