refactor(library/algebra/category/constructions): more rewrite tactic tests
This commit is contained in:
parent
adae95cf68
commit
14aeac180a
4 changed files with 29 additions and 27 deletions
|
@ -25,11 +25,11 @@ namespace nat_trans
|
|||
(λ a, η a ∘ θ a)
|
||||
(λ a b f,
|
||||
calc
|
||||
H f ∘ (η a ∘ θ a) = (H f ∘ η a) ∘ θ a : assoc
|
||||
... = (η b ∘ G f) ∘ θ a : naturality η f
|
||||
... = η b ∘ (G f ∘ θ a) : assoc
|
||||
... = η b ∘ (θ b ∘ F f) : naturality θ f
|
||||
... = (η b ∘ θ b) ∘ F f : assoc)
|
||||
H f ∘ (η a ∘ θ a) = (H f ∘ η a) ∘ θ a : by rewrite assoc
|
||||
... = (η b ∘ G f) ∘ θ a : by rewrite naturality
|
||||
... = η b ∘ (G f ∘ θ a) : by rewrite assoc
|
||||
... = η b ∘ (θ b ∘ F f) : by rewrite naturality
|
||||
... = (η b ∘ θ b) ∘ F f : by rewrite assoc)
|
||||
|
||||
infixr `∘n`:60 := compose
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ namespace is_equiv
|
|||
is_contr.mk
|
||||
(fiber.mk (f⁻¹ b) (retr f b))
|
||||
(λz, fiber.rec_on z (λa p, fiber.eq_mk ((ap f⁻¹ p)⁻¹ ⬝ sect f a) (calc
|
||||
retr f b = (ap (f ∘ f⁻¹) p)⁻¹ ⬝ ((ap (f ∘ f⁻¹) p) ⬝ retr f b) : inv_con_cancel_left
|
||||
retr f b = (ap (f ∘ f⁻¹) p)⁻¹ ⬝ ((ap (f ∘ f⁻¹) p) ⬝ retr f b) : by rewrite inv_con_cancel_left
|
||||
... = (ap (f ∘ f⁻¹) p)⁻¹ ⬝ (retr f (f a) ⬝ p) : by rewrite ap_con_eq_con
|
||||
... = (ap (f ∘ f⁻¹) p)⁻¹ ⬝ (ap f (sect f a) ⬝ p) : by rewrite adj
|
||||
... = (ap (f ∘ f⁻¹) p)⁻¹ ⬝ ap f (sect f a) ⬝ p : con.assoc
|
||||
... = (ap (f ∘ f⁻¹) p)⁻¹ ⬝ ap f (sect f a) ⬝ p : by rewrite con.assoc
|
||||
... = (ap f (ap f⁻¹ p))⁻¹ ⬝ ap f (sect f a) ⬝ p : by rewrite ap_compose
|
||||
... = ap f (ap f⁻¹ p)⁻¹ ⬝ ap f (sect f a) ⬝ p : by rewrite ap_inv
|
||||
... = ap f ((ap f⁻¹ p)⁻¹ ⬝ sect f a) ⬝ p : by rewrite ap_con)))
|
||||
|
|
|
@ -238,11 +238,13 @@ namespace category
|
|||
|
||||
definition postcomposition_functor {x y : D} (h : x ⟶ y)
|
||||
: Slice_category D x ⇒ Slice_category D y :=
|
||||
functor.mk (λ a, sigma.mk (to_ob a) (h ∘ ob_hom a))
|
||||
(λ a b f, sigma.mk (hom_hom f)
|
||||
(calc
|
||||
(h ∘ ob_hom b) ∘ hom_hom f = h ∘ (ob_hom b ∘ hom_hom f) : (assoc h (ob_hom b) (hom_hom f))⁻¹
|
||||
... = h ∘ ob_hom a : congr_arg (λx, h ∘ x) (commute f)))
|
||||
functor.mk
|
||||
(λ a, sigma.mk (to_ob a) (h ∘ ob_hom a))
|
||||
(λ a b f,
|
||||
⟨hom_hom f,
|
||||
calc
|
||||
(h ∘ ob_hom b) ∘ hom_hom f = h ∘ (ob_hom b ∘ hom_hom f) : by rewrite assoc
|
||||
... = h ∘ ob_hom a : by rewrite commute⟩)
|
||||
(λ a, rfl)
|
||||
(λ a b c g f, dpair_eq rfl !proof_irrel)
|
||||
|
||||
|
@ -347,11 +349,11 @@ namespace category
|
|||
(show to_hom c ∘ (hom_src g ∘ hom_src f) = (hom_dst g ∘ hom_dst f) ∘ to_hom a,
|
||||
proof
|
||||
calc
|
||||
to_hom c ∘ (hom_src g ∘ hom_src f) = (to_hom c ∘ hom_src g) ∘ hom_src f : !assoc
|
||||
... = (hom_dst g ∘ to_hom b) ∘ hom_src f : {commute g}
|
||||
... = hom_dst g ∘ (to_hom b ∘ hom_src f) : symm !assoc
|
||||
... = hom_dst g ∘ (hom_dst f ∘ to_hom a) : {commute f}
|
||||
... = (hom_dst g ∘ hom_dst f) ∘ to_hom a : !assoc
|
||||
to_hom c ∘ (hom_src g ∘ hom_src f) = (to_hom c ∘ hom_src g) ∘ hom_src f : by rewrite assoc
|
||||
... = (hom_dst g ∘ to_hom b) ∘ hom_src f : by rewrite commute
|
||||
... = hom_dst g ∘ (to_hom b ∘ hom_src f) : by rewrite assoc
|
||||
... = hom_dst g ∘ (hom_dst f ∘ to_hom a) : by rewrite commute
|
||||
... = (hom_dst g ∘ hom_dst f) ∘ to_hom a : by rewrite assoc
|
||||
qed)
|
||||
))
|
||||
(λ a, sigma.mk id (sigma.mk id (!id_right ⬝ (symm !id_left))))
|
||||
|
|
Loading…
Reference in a new issue