The areas / V34. The tactics of Mathlib
Mathlib.Tactic.CategoryTheory.Map
5 declarations. Mathlib docs · Source
def Mathlib.Tactic.CategoryTheory.Map.mapCompSimp E1 #
Lean.Expr → Lean.MetaM Lean.Meta.Simp.Result
simp only with Functor.map_comp and Functor.map_id on a single expression
(used on each side via simpEq).
def Mathlib.Tactic.CategoryTheory.Map.mapExprHom E1 #
(type : Q(Prop)) → Q(«$type») → Lean.Level → Lean.Level → Lean.Elab.TermElabM Lean.Expr
Build the functor map lemma for e : f = g with target category levels uLev, vLev.
def Mathlib.Tactic.CategoryTheory.Map.mapExpr E1 #
Lean.Expr → Lean.Elab.TermElabM Lean.Expr
Given a proof pf of ∀ .., f = g with f g morphisms in a category, produce a proof of the
map lemma, quantifying over every target category D and every functor F : C ⥤ D.
The target category uses fresh universe metavariables, which the attribute generalizes to
parameters and map_of% leaves for the surrounding elaboration to determine.
def Mathlib.Tactic.CategoryTheory.Map.mapStx E1 #
Lean.ParserDescr
Adding @[map] to a lemma named H of shape ∀ .., f = g, where f and g are morphisms
in some category C, creates a new lemma named H_map of the form
∀ .. {D} (F : C ⥤ D), F.map f = F.map g and then applies
simp only [Functor.map_comp, Functor.map_id].
Use @[map (attr := simp)] to mark both the original lemma and H_map as simp lemmas, and
@[map (attr := reassoc)] to generate reassociated versions of both the original lemma and the
_map lemma (@[reassoc (attr := map)] generates _map versions of both the original and the
reassociated lemma, but this is of course less general than @[map (attr := reassoc)]). All four
lemmas can be registered as simp lemmas with @[map (attr := reassoc (attr := simp))].
def Mathlib.Tactic.CategoryTheory.Map.«termMap_of%_» E1 #
Lean.ParserDescr
map_of% t, where t is an equality f = g between morphisms (possibly under ∀ binders),
produces the corresponding statement with a functor applied and
simp only [Functor.map_comp, Functor.map_id] on each side.