Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/MathlibTest/     Datei vom 15.10.2026 mit Größe 1 kB image not shown  

Quelle  TacticCheckInstancesReassoc.lean   Sprache: Lean

 

module

public import Mathlib.Tactic.CategoryTheory.Reassoc

@[expose] public section

set_option linter.tacticCheckInstances true

open CategoryTheory

universe v u

variable {C : Type u} [Category.{v} C]

/-! reassoc on a clean lemma, no warning expected. -/

#guard_msgs in
@[reassoc]
lemma clean_lem {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : X ⟶ Z) (w : f ≫ g = h) :
    f ≫ g = h := w


/-! a semireducible alias used for `.implicit`-ill-typed equation -/

def MyHom (X Y : C) : Type v := X ⟶ Y

/--
warning: generated lemma alias_lem_assoc is not type-correct at `.implicit` transparency; consider marking some of the following as `@[implicit_reducible]`:
  Quiver.Hom
  MyHom

Note: This linter can be disabled with `set_option linter.tacticCheckInstances false`
-/

#guard_msgs in
@[reassoc]
lemma alias_lem {X Y Z : C} (f : MyHom X Y) (g : Y ⟶ Z) (h : MyHom X Z)
    (w : (f : X ⟶ Y) ≫ g = h) :
    (f : X ⟶ Y) ≫ g = h := w

/-! marking the offenders `@[implicit_reducible]` silences the warning -/

set_option allowUnsafeReducibility true
attribute [implicit_reducible] Quiver.Hom MyHom

#guard_msgs in
@[reassoc]
lemma alias_lem2 {X Y Z : C} (f : MyHom X Y) (g : Y ⟶ Z) (h : MyHom X Z)
    (w : (f : X ⟶ Y) ≫ g = h) :
    (f : X ⟶ Y) ≫ g = h := w

Messung
CHZG
929810096

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland