l3lab/ntp-mathlib huggingface dataset:
/-- The uniqueness of `lift`. -/
@[simp]
def liftUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F)
    (hG : G.obj star ≅ Z)
    (hh : ∀ x : C, hG.symm.hom ≫ G.map (starInitial.to (incl.obj x)) = M x ≫ h.symm.hom.app x) :
    G ≅ lift F M hM :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
        symm
        erw [← Iso.eq_inv_comp, ← Category.assoc, hh]
        

Proof state:
case star.of.unit
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} D
Z : D
F : C ⥤ D
M : (x : C) → Z ⟶ F.obj x
hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y
G : WithInitial C ⥤ D
h : incl ⋙ G ≅ F
hG : G.obj star ≅ Z
hh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
Y : C
⊢ (lift F M hM).map PUnit.unit = (M Y ≫ h.symm.hom.app Y) ≫ h.hom.app Y

Next tactic:
simp
/-- The uniqueness of `lift`. -/
@[simp]
def liftUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F)
    (hG : G.obj star ≅ Z)
    (hh : ∀ x : C, hG.symm.hom ≫ G.map (starInitial.to (incl.obj x)) = M x ≫ h.symm.hom.app x) :
    G ≅ lift F M hM :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
        symm
        erw [← Iso.eq_inv_comp, ← Category.assoc, hh]
        simp
      · 

Proof state:
case star.star
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} D
Z : D
F : C ⥤ D
M : (x : C) → Z ⟶ F.obj x
hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y
G : WithInitial C ⥤ D
h : incl ⋙ G ≅ F
hG : G.obj star ≅ Z
hh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
f : star ⟶ star
⊢ G.map f ≫
      ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom =
    ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom ≫
      (lift F M hM).map f

Next tactic:
cases f
/-- The uniqueness of `lift`. -/
@[simp]
def liftUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F)
    (hG : G.obj star ≅ Z)
    (hh : ∀ x : C, hG.symm.hom ≫ G.map (starInitial.to (incl.obj x)) = M x ≫ h.symm.hom.app x) :
    G ≅ lift F M hM :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
        symm
        erw [← Iso.eq_inv_comp, ← Category.assoc, hh]
        simp
      · cases f
        

Proof state:
case star.star.unit
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} D
Z : D
F : C ⥤ D
M : (x : C) → Z ⟶ F.obj x
hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y
G : WithInitial C ⥤ D
h : incl ⋙ G ≅ F
hG : G.obj star ≅ Z
hh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
⊢ G.map PUnit.unit ≫
      ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom =
    ((fun X =>
            match X with
            | of x => h.app x
            | star => hG)
          star).hom ≫
      (lift F M hM).map PUnit.unit

Next tactic:
change G.map (𝟙 _) ≫ hG.hom = hG.hom ≫ 𝟙 _
/-- The uniqueness of `lift`. -/
@[simp]
def liftUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y)
    (G : WithInitial C ⥤ D) (h : incl ⋙ G ≅ F)
    (hG : G.obj star ≅ Z)
    (hh : ∀ x : C, hG.symm.hom ≫ G.map (starInitial.to (incl.obj x)) = M x ≫ h.symm.hom.app x) :
    G ≅ lift F M hM :=
  NatIso.ofComponents
    (fun X =>
      match X with
      | of x => h.app x
      | star => hG)
    (by
      rintro (X | X) (Y | Y) f
      · apply h.hom.naturality
      · cases f
      · cases f
        change G.map _ ≫ h.hom.app _ = hG.hom ≫ _
        symm
        erw [← Iso.eq_inv_comp, ← Category.assoc, hh]
        simp
      · cases f
        change G.map (𝟙 _) ≫ hG.hom = hG.hom ≫ 𝟙 _
        

Proof state:
case star.star.unit
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{?u.300381, u_1} D
Z : D
F : C ⥤ D
M : (x : C) → Z ⟶ F.obj x
hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y
G : WithInitial C ⥤ D
h : incl ⋙ G ≅ F
hG : G.obj star ≅ Z
hh : ∀ (x : C), hG.symm.hom ≫ G.map (Limits.IsInitial.to starInitial (incl.obj x)) = M x ≫ h.symm.hom.app x
⊢ G.map (𝟙 star) ≫ hG.hom = hG.hom ≫ 𝟙 Z

Next tactic:
simp
@[to_additive (attr := simp)]
theorem max_one_div_max_inv_one_eq_self (a : α) : max a 1 / max a⁻¹ 1 = a := by
  

Proof state:
α : Type u_1
inst✝² : Group α
inst✝¹ : LinearOrder α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ max a 1 / max a⁻¹ 1 = a

Next tactic:
rcases le_total a 1 with (h | h)
@[to_additive (attr := simp)]
theorem max_one_div_max_inv_one_eq_self (a : α) : max a 1 / max a⁻¹ 1 = a := by
  rcases le_total a 1 with (h | h) <;> 

Proof state:
case inl
α : Type u_1
inst✝² : Group α
inst✝¹ : LinearOrder α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
h : a ≤ 1
⊢ max a 1 / max a⁻¹ 1 = a

Next tactic:
simp [h]
@[to_additive (attr := simp)]
theorem max_one_div_max_inv_one_eq_self (a : α) : max a 1 / max a⁻¹ 1 = a := by
  rcases le_total a 1 with (h | h) <;> 

Proof state:
case inr
α : Type u_1
inst✝² : Group α
inst✝¹ : LinearOrder α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
h : 1 ≤ a
⊢ max a 1 / max a⁻¹ 1 = a

Next tactic:
simp [h]
@[to_additive min_sub_sub_right]
theorem min_div_div_right' (a b c : α) : min (a / c) (b / c) = min a b / c := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b✝ c✝ a b c : α
⊢ min (a / c) (b / c) = min a b / c

Next tactic:
simpa only [div_eq_mul_inv] using min_mul_mul_right a b c⁻¹
@[to_additive max_sub_sub_right]
theorem max_div_div_right' (a b c : α) : max (a / c) (b / c) = max a b / c := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b✝ c✝ a b c : α
⊢ max (a / c) (b / c) = max a b / c

Next tactic:
simpa only [div_eq_mul_inv] using max_mul_mul_right a b c⁻¹
@[to_additive min_sub_sub_left]
theorem min_div_div_left' (a b c : α) : min (a / b) (a / c) = a / max b c := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b✝ c✝ a b c : α
⊢ min (a / b) (a / c) = a / max b c

Next tactic:
simp only [div_eq_mul_inv, min_mul_mul_left, min_inv_inv']
@[to_additive max_sub_sub_left]
theorem max_div_div_left' (a b c : α) : max (a / b) (a / c) = a / min b c := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b✝ c✝ a b c : α
⊢ max (a / b) (a / c) = a / min b c

Next tactic:
simp only [div_eq_mul_inv, max_mul_mul_left, max_inv_inv']
theorem max_sub_max_le_max (a b c d : α) : max a b - max c d ≤ max (a - c) (b - d) := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ max a b - max c d ≤ max (a - c) (b - d)

Next tactic:
simp only [sub_le_iff_le_add, max_le_iff]
theorem max_sub_max_le_max (a b c d : α) : max a b - max c d ≤ max (a - c) (b - d) := by
  simp only [sub_le_iff_le_add, max_le_iff]; 

Proof state:
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ a ≤ max (a - c) (b - d) + max c d ∧ b ≤ max (a - c) (b - d) + max c d

Next tactic:
constructor
theorem max_sub_max_le_max (a b c d : α) : max a b - max c d ≤ max (a - c) (b - d) := by
  simp only [sub_le_iff_le_add, max_le_iff]; constructor
  

Proof state:
case left
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ a ≤ max (a - c) (b - d) + max c d
case right α : Type u_1 inst✝ : LinearOrderedAddCommGroup α a✝ b✝ c✝ a b c d : α ⊢ b ≤ max (a - c) (b - d) + max c d

Next tactic:
calc
    a = a - c + c := (sub_add_cancel a c).symm
    _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_left _ _) (le_max_left _ _)
theorem max_sub_max_le_max (a b c d : α) : max a b - max c d ≤ max (a - c) (b - d) := by
  simp only [sub_le_iff_le_add, max_le_iff]; constructor
  calc
    a = a - c + c := (sub_add_cancel a c).symm
    _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_left _ _) (le_max_left _ _)
  

Proof state:
case right
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ b ≤ max (a - c) (b - d) + max c d

Next tactic:
calc
    b = b - d + d := (sub_add_cancel b d).symm
    _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_right _ _) (le_max_right _ _)
theorem abs_max_sub_max_le_max (a b c d : α) : |max a b - max c d| ≤ max |a - c| |b - d| := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ |max a b - max c d| ≤ max |a - c| |b - d|

Next tactic:
refine' abs_sub_le_iff.2 ⟨_, _⟩
theorem abs_max_sub_max_le_max (a b c d : α) : |max a b - max c d| ≤ max |a - c| |b - d| := by
  refine' abs_sub_le_iff.2 ⟨_, _⟩
  · 

Proof state:
case refine'_1
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ max a b - max c d ≤ max |a - c| |b - d|

Next tactic:
exact (max_sub_max_le_max _ _ _ _).trans (max_le_max (le_abs_self _) (le_abs_self _))
theorem abs_max_sub_max_le_max (a b c d : α) : |max a b - max c d| ≤ max |a - c| |b - d| := by
  refine' abs_sub_le_iff.2 ⟨_, _⟩
  · exact (max_sub_max_le_max _ _ _ _).trans (max_le_max (le_abs_self _) (le_abs_self _))
  · 

Proof state:
case refine'_2
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ max c d - max a b ≤ max |a - c| |b - d|

Next tactic:
rw [abs_sub_comm a c, abs_sub_comm b d]
theorem abs_max_sub_max_le_max (a b c d : α) : |max a b - max c d| ≤ max |a - c| |b - d| := by
  refine' abs_sub_le_iff.2 ⟨_, _⟩
  · exact (max_sub_max_le_max _ _ _ _).trans (max_le_max (le_abs_self _) (le_abs_self _))
  · rw [abs_sub_comm a c, abs_sub_comm b d]
    

Proof state:
case refine'_2
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ max c d - max a b ≤ max |c - a| |d - b|

Next tactic:
exact (max_sub_max_le_max _ _ _ _).trans (max_le_max (le_abs_self _) (le_abs_self _))
theorem abs_min_sub_min_le_max (a b c d : α) : |min a b - min c d| ≤ max |a - c| |b - d| := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ |min a b - min c d| ≤ max |a - c| |b - d|

Next tactic:
simpa only [max_neg_neg, neg_sub_neg, abs_sub_comm] using
    abs_max_sub_max_le_max (-a) (-b) (-c) (-d)
theorem abs_max_sub_max_le_abs (a b c : α) : |max a c - max b c| ≤ |a - b| := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c : α
⊢ |max a c - max b c| ≤ |a - b|

Next tactic:
simpa only [sub_self, abs_zero, max_eq_left (abs_nonneg (a - b))]
    using abs_max_sub_max_le_max a c b c
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
⊢ ∀ (a_1 : R), star a * a_1 = a_1 * star a

Next tactic:
simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star a * (b * c) = star a * (star (star b) * star (star c))

Next tactic:
rw [star_star, star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star a * (star (star b) * star (star c)) = star a * star (star c * star b)

Next tactic:
rw [star_mul]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star a * star (star c * star b) = star (star c * star b * a)

Next tactic:
rw [← star_mul]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (star c * star b * a) = star (star c * (star b * a))

Next tactic:
rw [ha.right_assoc]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (star c * (star b * a)) = star (star b * a) * c

Next tactic:
rw [star_mul, star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (star b * a) * c = star a * b * c

Next tactic:
rw [star_mul, star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ b * star a * c = star (star c * star (b * star a))

Next tactic:
rw [← star_mul, star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by rw [← star_mul, star_star]
    _ = star (star c * (a * star b)) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (star c * star (b * star a)) = star (star c * (a * star b))

Next tactic:
rw [star_mul b, star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by rw [← star_mul, star_star]
    _ = star (star c * (a * star b)) := by rw [star_mul b, star_star]
    _ = star ((star c * a) * star b) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (star c * (a * star b)) = star (star c * a * star b)

Next tactic:
rw [ha.mid_assoc]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by rw [← star_mul, star_star]
    _ = star (star c * (a * star b)) := by rw [star_mul b, star_star]
    _ = star ((star c * a) * star b) := by rw [ha.mid_assoc]
    _ = b * (star a * c) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (star c * a * star b) = b * (star a * c)

Next tactic:
rw [star_mul, star_star, star_mul (star c), star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by rw [← star_mul, star_star]
    _ = star (star c * (a * star b)) := by rw [star_mul b, star_star]
    _ = star ((star c * a) * star b) := by rw [ha.mid_assoc]
    _ = b * (star a * c) := by rw [star_mul, star_star, star_mul (star c), star_star]
  right_assoc b c := calc
    b * c * star a = star (a * star (b * c)) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ b * c * star a = star (a * star (b * c))

Next tactic:
rw [star_mul, star_star]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by rw [← star_mul, star_star]
    _ = star (star c * (a * star b)) := by rw [star_mul b, star_star]
    _ = star ((star c * a) * star b) := by rw [ha.mid_assoc]
    _ = b * (star a * c) := by rw [star_mul, star_star, star_mul (star c), star_star]
  right_assoc b c := calc
    b * c * star a = star (a * star (b * c)) := by rw [star_mul, star_star]
    _ = star (a * (star c * star b)) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (a * star (b * c)) = star (a * (star c * star b))

Next tactic:
rw [star_mul b]
theorem Set.star_mem_center (ha : a ∈ Set.center R) : star a ∈ Set.center R where
  comm := by simpa only [star_mul, star_star] using fun g =>
    congr_arg star (((Set.mem_center_iff R).mp ha).comm <| star g).symm
  left_assoc b c := calc
    star a * (b * c) = star a * (star (star b) * star (star c)) := by rw [star_star, star_star]
    _ = star a * star (star c * star b) := by rw [star_mul]
    _ = star ((star c * star b) * a) := by rw [← star_mul]
    _ = star (star c * (star b * a)) := by rw [ha.right_assoc]
    _ = star (star b * a) * c := by rw [star_mul, star_star]
    _ = (star a * b) * c := by rw [star_mul, star_star]
  mid_assoc b c := calc
    b * star a * c = star (star c * star (b * star a)) := by rw [← star_mul, star_star]
    _ = star (star c * (a * star b)) := by rw [star_mul b, star_star]
    _ = star ((star c * a) * star b) := by rw [ha.mid_assoc]
    _ = b * (star a * c) := by rw [star_mul, star_star, star_mul (star c), star_star]
  right_assoc b c := calc
    b * c * star a = star (a * star (b * c)) := by rw [star_mul, star_star]
    _ = star (a * (star c * star b)) := by rw [star_mul b]
    _ = star ((a * star c) * star b) := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : StarMul R
a : R
s : Set R
ha : a ∈ center R
b c : R
⊢ star (a * (star c * star b)) = star (a * star c * star b)

Next tactic:
rw [ha.left_assoc]