Open Seasawher opened 16 hours ago
/-- 与えられた型の対を作る -/ def Pair (α : Type) : Type := α × α /-- `Pair` を関手にする -/ instance : Functor Pair where map f := fun a => (f a.fst, f a.snd) macro "functor" : tactic => `(tactic| constructor <;> aesop) instance : LawfulFunctor Pair := by functor