Skip to content

Commit

Permalink
fix(category_theory/limits): make image.map_comp a simp lemma (#2456)
Browse files Browse the repository at this point in the history
This was not possible in Lean 3.8. Many thanks to @gebner for tracking down and fixing leanprover-community/lean#181 in Lean 3.9.
  • Loading branch information
TwoFX committed Apr 19, 2020
1 parent e6aa533 commit a8edb5e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/category_theory/limits/shapes/images.lean
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ variables [has_image_map sq']
def has_image_map_comp : has_image_map (sq ≫ sq') :=
{ map := image.map sq ≫ image.map sq' }

-- This cannot be a simp lemma, see https://github.com/leanprover-community/lean/issues/181.
@[simp]
lemma image.map_comp [has_image_map (sq ≫ sq')] :
image.map (sq ≫ sq') = image.map sq ≫ image.map sq' :=
show (has_image_map.map (sq ≫ sq')) = (has_image_map_comp sq sq').map, by congr
Expand Down Expand Up @@ -413,8 +413,7 @@ variables [has_images.{v} C] [has_image_maps.{v} C]
@[simps]
def im : arrow C ⥤ C :=
{ obj := λ f, image f.hom,
map := λ _ _ st, image.map st,
map_comp' := λ _ _ _ _ _, image.map_comp _ _ }
map := λ _ _ st, image.map st }

end has_image_maps

Expand Down

0 comments on commit a8edb5e

Please sign in to comment.