• Keine Ergebnisse gefunden

Exercise 6.1 (Hindley-Milner Type Order) We defined types by

N/A
N/A
Protected

Academic year: 2021

Aktie "Exercise 6.1 (Hindley-Milner Type Order) We defined types by"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

WS 2019/2020 22.01.2020 Exercises to the lecture

Semantics Sheet 6 Prof. Dr. Roland Meyer,

Sören van der Wall Delivery until — at —

Exercise 6.1 (Hindley-Milner Type Order) We defined types by

τ

mono

::= α | Cτ

mono

. . . τ

mono

τ ::= ∀α.τ

where α is from a set of variables and C is from a set of type constructors including →.

We define an equivalence to sort out unnecessary types: Let ≡ be the least equivalence containing for any type τ and variable α, γ 6∈ f ree(τ ), β ∈ f ree(τ ),

∀β

1

. . . β

n

α.τ ≡ ∀β

1

. . . β

n

.τ and ∀β

1

. . . β

n

β.τ ≡ ∀β

1

. . . β

n

γ.{β 7→ γ }τ

Further, types will only be looked at up to the above equivalence. When a type is not allowed to have quantors and it has an equivalent quantor-free type, the latter is considered.

We defined a partial specialization order on types:

τ

0

= {α

1

7→ τ

1

, . . . , α

n

7→ τ

n

}τ β

i

6∈ f ree(∀α

1

. . . α

n

.τ)

∀α

1

. . . α

n

.τ v ∀β

1

. . . β

m

0

Show the Lemma from the lecture:

Lemma. v is a partial order on the set of types (up to equivalence) with a least element.

Downward directed sets also contain a unique minimal element.

Bonus: Show that it is actually a meet-semilattice (I.e. each finite subset has a meet).

Referenzen

ÄHNLICHE DOKUMENTE

[r]

The so-called stability criterion (or Courant criterion) is const=c dt/dx where c is the maximum velocity and const=1. You want to simulate 500s. Determine dt and the number

[r]

Fachbereich Mathematik und

Indivisible (single) particles à no coincidences (Elementary) Particles explain:. •  No inner

Prof. the inductive construction for the least fixed-point of the monotone operator defined by ϕ terminates after at most m ϕ steps). Show that LFP ≡ FO over fixed-point

To prove this, it can be helpful to observe that a random graph in K results by tossing a fair coin for every possible edge pair {i, j}, {−i, −j}. Put everything together to prove

In this exercise we want to show that the model construction for FO 2 -formulae from the lecture is optimal in the following sense: in general it does not suffice to take only