Lean4
/-- The flat sections of a functor into `GrpCat` form a subgroup of all sections. -/
@[to_additive /-- The flat sections of a functor into `AddGrpCat` form an additive subgroup of all sections. -/
]
def sectionsSubgroup : Subgroup (∀ j, F.obj j) :=
{
MonCat.sectionsSubmonoid
(F ⋙ forget₂ GrpCat MonCat) with
carrier := (F ⋙ forget GrpCat).sections
inv_mem' := fun {a} ah j j' f => by
simp only [Functor.comp_map, Pi.inv_apply]
dsimp [Functor.sections] at ah ⊢
rw [(F.map f).hom.map_inv (a j), ah f] }