(Translated by https://www.hiragana.jp/)
User:Pengo/comp - Wikipedia Jump to content

User:Pengo/comp

From Wikipedia, the free encyclopedia
Flag of Earth Peter Halasz (talk) ?

Subpages: /dia | /missing | /org | /pages | /photo | /quotes

Ideas: /rants | /ite | /R | /teletaxo

Subjects: /bot | /comp | /ee | /eco | /fringe | /micro | /sd | /zoo

Incubator: /ownimg | /teletaxotest | /self

Computer science and related topics

Codata

[edit]

from the paper Codata and Comonads in Haskell [1] (pdf)

Not covered

[edit]

Introduction

[edit]

Definition styles

[edit]

Symantics styles

[edit]

ML example (ch4)

[edit]

The Untyped Lambda-calculus

[edit]

Alternatives:

Free variables and bound variables:

Evaluation strategies:

Lambda calculus grammmar:

t ::=            terms:
       x         variable
       λらむだx.t      abstraction or lambda-abstraction
       t t       application

Language levels:

Capture:

Free variables:

  • FV(t) is the set of free variables of term t.
  • FV(x) = {x}
  • FV(λらむだx.t1) = FV(t1)\{x}
  • FV(t1 t2) = FV(t1) ∪ FV(t2)

Nameless representation of types

[edit]

Capture (cont):

Nicholas de Bruijn:

Explicit substitution:

Typed Arithmetic Expressions

[edit]

Safety = Progress + Preservation

Simply typed lambda-calculus

[edit]

Type assignment system:

symbols:

  • Γがんま ⊢ t:T "the closed term t has type T under the empty set of assumptions."
  • (not from book)inference, reduces to. x ⊢ y means y is derived from x
  • Table of mathematical symbols
  • Γがんま ⊢ x : R, then x:R ∈ Γがんま (the type assumed for x in Γがんま is R)
  • dom(Γがんま) gives the set of variables bound by Γがんま

context:

  • Γがんま is context
  • Γがんま is the set of assumptions about the types of the free variables in t.
  • Γがんま ⊢ ... "using the context Γがんま ..."
  • typing context or type environment
T ::=            types:
       T→T       type of functions

Γがんま ::=            contexts:
       ∅        empty context
       Γがんま,x:T     term variable binding

more lemmas:

Curry-Howard Correspondence:

Logic Programming languages
propositions types
proposition P ⊃ Q type P → Q
proposition P ∧ Q type P × Q
proof of proposition P term t of type P
proposition P is provable type P is inhabited (by some term)

Thorough discussions of this correspondence:

  • Girard, Lafont, and Laylot (1989)
  • Gallier (1993)
  • Sørensen and Urzyczyn (1998)
  • Pfenning (2001)
  • Goubault-Larrecq and Mackie (1997)
  • Simmons (2000)

Erasure and Typability

Simple extensions

[edit]

e.g.

Addr = <physical:PhysicalAddr, virtual:VirtualAddr>;
a = <physical:pa> as Addr;

also for null-able types:

OptionalNat = <none:Unit, some:Nat>;

e.g.

EuroAmount = <euros:Float>;

Normalization

[edit]