其他分享
首页 > 其他分享> > Functor 怎么会事呢

Functor 怎么会事呢

作者:互联网

Functor 怎么会事呢

<iframe class="quiver-embed" height="432" src="https://q.uiver.app/?q=WzAsNSxbMCwwLCJBIl0sWzIsMCwiRihBKSJdLFswLDIsImYoQSkiXSxbMiwyLCJGKGYoQSkpIH5+fHx+fiBGKGYpKEYoQSkpIl0sWzAsMV0sWzAsMiwiZiIsMCx7ImNvbG91ciI6WzAsNjAsNjBdfSxbMCw2MCw2MCwxXV0sWzEsMywiRihmKSIsMix7ImNvbG91ciI6WzI0MCw2MCw2MF19LFsyNDAsNjAsNjAsMV1dLFswLDEsIkYiLDAseyJjb2xvdXIiOlsyNDAsNjAsNjBdfSxbMjQwLDYwLDYwLDFdXSxbMiwzLCJGIiwwLHsiY29sb3VyIjpbMCw2MCw2MF19LFswLDYwLDYwLDFdXSxbNSw2LCJGIiwwLHsic2hvcnRlbiI6eyJzb3VyY2UiOjIwLCJ0YXJnZXQiOjMwfX1dXQ==&embed" style="border-radius: 8px; border: none" width="701"></iframe>

Functor 2 axioms

  1. \(F(id_A) = id_{F(A)}\)
  2. \(F(f \circ g) = F(f) \circ F(g)\)

这两个公理能证明

\[F(f(A)) = F(f)(F(A)) \]

吗?

还真能

变一下形式

即证:

\[(F\circ f) (A) = (F(f) \circ F) (A) \]

只需

\[\begin{aligned} F \circ f =& F(f) \circ F\\ =&F(f\circ id_A)\\ =&F(f) \end{aligned} \]

!注意! \(F(f(A)) = (F\circ f)(A)\) 不代表 \(F(f) = F\circ f\),函数的符号表示对不习惯的人(比如我)有误导性。

Seems to make sense

一步步推的话这样写

\[\begin{aligned} F(f(A)) &= F(f(id_A(A)))\\ &= (F(f)\circ F(id_A)) (A)\\ &= (F(f)\circ F) (A)\\ &= F(f)(F(A)) \end{aligned} \]

交换图

从最上面的交换图来看,\(F\circ f = F(f) \circ F\) 似乎是显然的,因为这只是态射的结合(蓝色态射的结合与红色态射的结合)

但是证明过程还是用到了 Functor 的两个公理。这说明 Functor 在这个交换图里做了一些保证

标签:怎么,end,态射,会事,Functor,circ,aligned,id
来源: https://www.cnblogs.com/human-in-human/p/16366532.html