lean-ja / lean-by-example

コード例で学ぶ Lean 言語
https://lean-ja.github.io/lean-by-example/
MIT License
33 stars 6 forks source link

Autoimplicit が誤解を招く例 #189

Open Seasawher opened 3 months ago

Seasawher commented 3 months ago

—-

Dear All,

there was a time where roughly this time on Friday there was a thread about some funny behaviour in Lean. I do not know if this has been brought up before, but the following "every type is finite in Lean" made me laugh!

import Mathlib.Data.Finite.Basic

example {α} : Finite α := inferInstance

Do not spoil the fun for others, when you realize what is going on, please! Use spoiler-blocks for compromising comments!

Seasawher commented 3 months ago

https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Every.20Type.20is.20finite.20.3B-.29