awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hl :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₁ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₂ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
⊢ Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
have hl₃ : Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) (counit ∘ₗ inl R A B) ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
Tactic: rw [comp_assoc, comul_comp_inl, ← comp_assoc, lTensor_comp_map, counit_comp_inl,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hl :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₁ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₂ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₃ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) (counit ∘ₗ inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
⊢ Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
have hl₄ : Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) counit ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
Tactic: rw [comp_assoc, comul_comp_inl, ← comp_assoc, lTensor_comp_map, counit_comp_inl,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hl :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₁ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₂ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₃ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) (counit ∘ₗ inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₄ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
⊢ Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
have hl₅ : Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((rTensor R (inl R A B) ∘ₗ lTensor A counit) ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
Tactic: rw [comp_assoc, comul_comp_inl, ← comp_assoc, lTensor_comp_map, counit_comp_inl,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hl :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₁ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₂ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₃ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) (counit ∘ₗ inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₄ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₅ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((rTensor R (inl R A B) ∘ₗ lTensor A counit) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
⊢ Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
have hl₆ : Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (rTensor R (inl R A B) ∘ₗ lTensor A counit ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
Tactic: rw [comp_assoc, comul_comp_inl, ← comp_assoc, lTensor_comp_map, counit_comp_inl,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hl :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₁ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₂ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₃ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) (counit ∘ₗ inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₄ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₅ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((rTensor R (inl R A B) ∘ₗ lTensor A counit) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₆ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (rTensor R (inl R A B) ∘ₗ lTensor A counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
⊢ Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
have hl₇ : Eq (α := A →ₗ[R] (A × B) ⊗[R] R)
  (rTensor R (inl R A B) ∘ₗ (LinearMap.flip (TensorProduct.mk R A R) : (a : R) → A →ₗ[R] A ⊗[R] R) 1)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
Tactic: rw [comp_assoc, comul_comp_inl, ← comp_assoc, lTensor_comp_map, counit_comp_inl,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hl :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₁ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₂ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inl R A B) (inl R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₃ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) (counit ∘ₗ inl R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₄ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inl R A B) counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₅ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((rTensor R (inl R A B) ∘ₗ lTensor A counit) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₆ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R) (rTensor R (inl R A B) ∘ₗ lTensor A counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
hl₇ :
  Eq (α := A →ₗ[R] (A × B) ⊗[R] R)
    (rTensor R (inl R A B) ∘ₗ (LinearMap.flip (TensorProduct.mk R A R) : (a : R) → A →ₗ[R] A ⊗[R] R) 1)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
⊢ Eq (α := A →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inl R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
have hl₈ : Eq (α := A →ₗ[R] (A × B) ⊗[R] R)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inl R A B)
Tactic: rw [comp_assoc, comul_comp_inl, ← comp_assoc, lTensor_comp_map, counit_comp_inl,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hr :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr₁ : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hr :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₁ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr₂ : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B)) ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hr :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₁ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₂ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr₃ : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) (counit ∘ₗ inr R A B) ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hr :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₁ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₂ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₃ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) (counit ∘ₗ inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr₄ : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) counit ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hr :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₁ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₂ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₃ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) (counit ∘ₗ inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₄ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr₅ : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((rTensor R (inr R A B) ∘ₗ lTensor B counit) ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]
-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.Basic (goal)
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
hr :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ comul ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₁ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₂ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ TensorProduct.map (inr R A B) (inr R A B)) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₃ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) (counit ∘ₗ inr R A B) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₄ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (TensorProduct.map (inr R A B) counit ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
hr₅ :
  Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((rTensor R (inr R A B) ∘ₗ lTensor B counit) ∘ₗ comul)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
⊢ Eq (α := B →ₗ[R] (A × B) ⊗[R] R) ((lTensor (A × B) counit ∘ₗ comul) ∘ₗ inr R A B)
    ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
have hr₆ : Eq (α := B →ₗ[R] (A × B) ⊗[R] R) (rTensor R (inr R A B) ∘ₗ lTensor B counit ∘ₗ comul)
  ((LinearMap.flip (TensorProduct.mk R (A × B) R) : (a : R) → A × B →ₗ[R] (A × B) ⊗[R] R) 1 ∘ₗ inr R A B)
Tactic: rw [comp_assoc, comul_comp_inr, ← comp_assoc, lTensor_comp_map, counit_comp_inr,
        ← rTensor_comp_lTensor, comp_assoc, lTensor_counit_comp_comul, rTensor_comp_flip_mk]