Top Banner
Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck Computer Science Dept. Lund University
117

Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

May 01, 2018

Download

Documents

doanthuy
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

Type Systems02 – Basic Concepts

Emma Söderberg

Jörn W. Janneck

Computer Science Dept.

Lund University

Page 2: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

2

Slides begged, borrowed, and copied from the Type Systems course at EPFL.Courtesy of Martin Odersky.

Page 3: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

3

Simple Arithmetic Expressions

Page 4: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

4

Page 5: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

5

Page 6: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

6

Page 7: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

7

Page 8: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

8

Page 9: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

9

Page 10: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

10

Page 11: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

11

Page 12: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

12

Page 13: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

13

Page 14: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

14

Induction

Page 15: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

15

Page 16: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

16

Page 17: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

17

Page 18: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

18

Page 19: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

19

Page 20: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

20

Induction on Syntax

Page 21: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

21

Page 22: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

22

Page 23: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

23

Page 24: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

24

Page 25: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

25

Page 26: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

26

Page 27: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

27

Page 28: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

28

Page 29: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

29

Page 30: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

30

Page 31: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

31

Page 32: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

32

Page 33: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

33

Page 34: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

34

Page 35: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

35

Page 36: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

36

Page 37: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

37

Page 38: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

38

Page 39: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

39

Page 40: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

40

Page 41: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

41

Page 42: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

42

Page 43: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

43

Page 44: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

44

Page 45: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

45

Page 46: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

46

Page 47: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

47

Page 48: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

48

Operational Semantics (Evaluation)

Page 49: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

49

Page 50: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

50

Page 51: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

51

Page 52: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

52

Page 53: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

53

Page 54: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

54

Page 55: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

55

Page 56: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

56

Page 57: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

57

Page 58: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

58

Page 59: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

59

Values & Normal Forms

Page 60: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

60

Page 61: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

61

Page 62: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

62

Page 63: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

63

Page 64: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

64

Page 65: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

65

Page 66: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

66

Page 67: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

67

Page 68: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

68

Page 69: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

69

Page 70: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

70

Page 71: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

71

Page 72: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

72

Page 73: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

73

Page 74: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

74

λ Calculus

Page 75: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

75

Page 76: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

76

Page 77: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

77

Page 78: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

78

Page 79: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

79

Page 80: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

80

Page 81: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

81

Page 82: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

82

Page 83: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

83

Page 84: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

84

Page 85: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

85

λ Calculus: Formalities

Page 86: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

86

Page 87: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

87

Page 88: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

88

Page 89: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

89

Page 90: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

90

Page 91: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

91

Page 92: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

92

Page 93: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

93

Page 94: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

94

Page 95: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

95

Classical λ Calculus

Page 96: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

96

Page 97: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

97

Page 98: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

98

Page 99: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

99

Page 100: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

100

Page 101: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

101

Page 102: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

102

Page 103: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

103

Page 104: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

104

Note:

We omit a lot of the discussion of the practical aspects of the λ calculus. Specifically, this includes...

• programming techniques• recursion• behavioral equivalence of terms

These topics are being discussed in the Odersky lecture slides (week 3 and 4),and also in section 5.2 of TAPL.

Page 105: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

105

Induction on the λ Calculus

Page 106: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

106

Page 107: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

107

Page 108: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

108

Page 109: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

109

Page 110: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

110

Page 111: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

111

Page 112: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

112

Page 113: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

113

Page 114: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

114

Page 115: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

115

Page 116: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

116

Page 117: Type Systems - LTHfileadmin.cs.lth.se/cs/Personal/Emma_Soderberg/type... ·  · 2012-02-22Type Systems 02 – Basic Concepts Emma Söderberg Jörn W. Janneck ... Proof: by induction

117