File tree Expand file tree Collapse file tree
Mathlib/CategoryTheory/Monoidal/Functor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2616,6 +2616,7 @@ import Mathlib.CategoryTheory.Monoidal.ExternalProduct.KanExtension
26162616import Mathlib.CategoryTheory.Monoidal.Free.Basic
26172617import Mathlib.CategoryTheory.Monoidal.Free.Coherence
26182618import Mathlib.CategoryTheory.Monoidal.Functor
2619+ import Mathlib.CategoryTheory.Monoidal.Functor.Types
26192620import Mathlib.CategoryTheory.Monoidal.FunctorCategory
26202621import Mathlib.CategoryTheory.Monoidal.Grp_
26212622import Mathlib.CategoryTheory.Monoidal.Hopf_
Original file line number Diff line number Diff line change 1+ /-
2+ Copyright (c) 2025 Vilim Lendvaj. All rights reserved.
3+ Released under Apache 2.0 license as described in the file LICENSE.
4+ Authors: Vilim Lendvaj
5+ -/
6+ import Mathlib.CategoryTheory.Monoidal.Functor
7+ import Mathlib.CategoryTheory.Monoidal.Types.Basic
8+ import Mathlib.CategoryTheory.Types.Basic
9+ import Mathlib.Tactic.Simps.Basic
10+
11+ /-!
12+ # Convert from `Applicative` to `CategoryTheory.Functor.LaxMonoidal`
13+
14+ This allows us to use Lean's `Type`-based applicative functors in category theory.
15+
16+ -/
17+
18+ namespace CategoryTheory
19+
20+ section
21+
22+ variable (F : Type * → Type *) [Applicative F] [LawfulApplicative F]
23+
24+ attribute [local simp] map_seq seq_map_assoc
25+ LawfulApplicative.pure_seq LawfulApplicative.seq_assoc in
26+ /-- A lawful `Applicative` gives a category theory `LaxMonoidal` functor
27+ between categories of types. -/
28+ @[simps]
29+ instance : (ofTypeFunctor F).LaxMonoidal where
30+ ε _ : F _ := pure PUnit.unit
31+ μ _ _ p : F _ := Prod.mk <$> p.1 <*> p.2
32+
33+ end
34+
35+ end CategoryTheory
You can’t perform that action at this time.
0 commit comments