File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ def hcomp {H I : D ⥤ E} (α : F ⟶ G) (β : H ⟶ I) : F ⋙ H ⟶ G ⋙ I wh
113113
114114-- Horizontal composition has two possible definitions that are dual to each other,
115115-- and we need to prove to `to_dual` that these are equivalent.
116- attribute [to_dual none] CategoryStruct.comp.hcongr_7 hcomp._proof_2 hcomp._proof_3
116+ attribute [to_dual none] hcomp._proof_2 hcomp._proof_3
117117to_dual_insert_cast hcomp := by ext x; exact β.naturality' (α.app x)
118118
119119/-- Notation for horizontal composition of natural transformations. -/
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
6363
6464attribute [to_dual existing inv] Iso.hom
6565attribute [to_dual self] Iso.mk Iso.casesOn
66- attribute [to_dual none] Iso.mk.hcongr_8 -- needed in `Iso.ext`
6766
6867attribute [reassoc +to_dual (attr := simp), grind =] Iso.hom_inv_id Iso.inv_hom_id
6968
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ structure CoconeMorphism (A B : Cocone F) where
244244 w (j : J) : dsimp% A.ι.app j ≫ hom = B.ι.app j := by cat_disch
245245
246246attribute [reassoc (attr := simp)] ConeMorphism.w CoconeMorphism.w
247- attribute [to_dual existing] ConeMorphism.mk.congr_simp ConeMorphism. casesOn
247+ attribute [to_dual existing] ConeMorphism.casesOn
248248
249249@[to_dual]
250250instance inhabitedConeMorphism (A : Cone F) : Inhabited (ConeMorphism A A) :=
Original file line number Diff line number Diff line change @@ -680,13 +680,14 @@ def updateAndAddDecl (t : TranslateData) (tgt : Name) (srcDecl : ConstantInfo)
680680 {ex.toMessageData}"
681681 throwError "@[{t.attrName}] failed. Nested error message:\n {ex.toMessageData}"
682682
683- /-- Unfold `simp` and `gcongr ` auxlemmas in the type and value.
683+ /-- Unfold `simp`, `gcongr` and `hcongr`/`congr_simp ` auxlemmas in the type and value.
684684The reason why we can't just translate them is that they are generated by the `@[simp]` attribute,
685685so it would require a change in the implementation of `@[simp]` to add these translations.
686686Additionally, these lemmas have very short proofs, so unfolding them is not costly. -/
687687def declUnfoldSimpAuxLemmas (decl : ConstantInfo) : MetaM ConstantInfo := do
688688 let unfold (e : Expr) := deltaExpand e (allowOpaque := true ) fun
689- | .str _ s => "_simp_" .isPrefixOf s || "_gcongr_" .isPrefixOf s
689+ | .str _ s => "_simp_" .isPrefixOf s || "_gcongr_" .isPrefixOf s ||
690+ isHCongrReservedNameSuffix s || s == congrSimpSuffix
690691 | _ => false
691692 let mut decl := decl
692693 decl := decl.updateType <| ← unfold decl.type
You can’t perform that action at this time.
0 commit comments