橋本 Hashimoto   Baku

橋本 Hashimoto   Baku

Injective / Surjective / Bijective (Scratchpad)

This page is a personal scratchpad.

f:AB

Injective 単射

“in-” (into): no two inputs map to the same output

  • イン〜... 複数の入力が束になって合流せずに、一本一本がスッとcodmainに入っていく、そのシュッと感
  • f(x)=f(y)x=y 「等しいものは写される前から等しい」
  • xyf(x)f(y) 「異なるものは写された後でも異なる」

Surjective 全射

“sur-“ (onto): covers the whole docomain

  • スゥ〜... ガバっと覆いかぶさる感じ
  • f(A)=B「Aそれぞれの元を移したものからなる集合は、Bと過不足無く一致する」

Maybeモナドは、f(x) に対応するcodomainのelementが存在し無い場合においても、「関数」として定義可能にするためにある感じ