l3lab/ntp-mathlib huggingface dataset:
theorem isFractionRing_of_isLocalization (S T : Type*) [CommRing S] [CommRing T] [Algebra R S]
    [Algebra R T] [Algebra S T] [IsScalarTower R S T] [IsLocalization M S] [IsFractionRing R T]
    (hM : M ≤ nonZeroDivisors R) : IsFractionRing S T := by
  have := isLocalization_of_submonoid_le S T M (nonZeroDivisors R) hM
  refine @isLocalization_of_is_exists_mul_mem _ _ _ _ _ _ _ this ?_ ?_
  · exact map_nonZeroDivisors_le M S
  · rintro ⟨x, hx⟩
    obtain ⟨⟨y, s⟩, e⟩ := IsLocalization.surj M x
    use algebraMap R S s
    rw [mul_comm, Subtype.coe_mk, e]
    refine' Set.mem_image_of_mem (algebraMap R S) _
    intro z hz
    apply IsLocalization.injective S hM
    rw [map_zero]
    apply hx
    

Proof state:
case h.a.a
R : Type u_1
inst✝⁹ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁸ : CommRing S✝
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
hM : M ≤ nonZeroDivisors R
this : IsLocalization (Submonoid.map (algebraMap R S) (nonZeroDivisors R)) T
x : S
hx : x ∈ nonZeroDivisors S
y : R
s : ↥M
e : x * (algebraMap R S) ↑(y, s).2 = (algebraMap R S) (y, s).1
z : R
hz : z * (y, s).1 = 0
⊢ (algebraMap R S) z * x = 0

Next tactic:
rw [← (map_units S s).mul_left_inj, mul_assoc, e, ← map_mul, hz, map_zero,
      zero_mul]
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
⊢ IsFractionRing S T

Next tactic:
haveI := IsFractionRing.nontrivial R T
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this : Nontrivial T
⊢ IsFractionRing S T

Next tactic:
haveI := (algebraMap S T).domain_nontrivial
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
⊢ IsFractionRing S T

Next tactic:
apply isFractionRing_of_isLocalization M S T
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
⊢ M ≤ nonZeroDivisors R

Next tactic:
intro x hx
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  intro x hx
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
x : R
hx : x ∈ M
⊢ x ∈ nonZeroDivisors R

Next tactic:
rw [mem_nonZeroDivisors_iff_ne_zero]
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  intro x hx
  rw [mem_nonZeroDivisors_iff_ne_zero]
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
x : R
hx : x ∈ M
⊢ x ≠ 0

Next tactic:
intro hx'
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  intro x hx
  rw [mem_nonZeroDivisors_iff_ne_zero]
  intro hx'
  

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
x : R
hx : x ∈ M
hx' : x = 0
⊢ False

Next tactic:
apply @zero_ne_one S
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  intro x hx
  rw [mem_nonZeroDivisors_iff_ne_zero]
  intro hx'
  apply @zero_ne_one S
  

Proof state:
case a
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
x : R
hx : x ∈ M
hx' : x = 0
⊢ 0 = 1

Next tactic:
rw [← (algebraMap R S).map_one, ← @mk'_one R _ M, @comm _ Eq, mk'_eq_zero_iff]
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  intro x hx
  rw [mem_nonZeroDivisors_iff_ne_zero]
  intro hx'
  apply @zero_ne_one S
  rw [← (algebraMap R S).map_one, ← @mk'_one R _ M, @comm _ Eq, mk'_eq_zero_iff]
  

Proof state:
case a
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
x : R
hx : x ∈ M
hx' : x = 0
⊢ ∃ m, ↑m * 1 = 0

Next tactic:
exact ⟨⟨x, hx⟩, by simp [hx']⟩
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T := by
  haveI := IsFractionRing.nontrivial R T
  haveI := (algebraMap S T).domain_nontrivial
  apply isFractionRing_of_isLocalization M S T
  intro x hx
  rw [mem_nonZeroDivisors_iff_ne_zero]
  intro hx'
  apply @zero_ne_one S
  rw [← (algebraMap R S).map_one, ← @mk'_one R _ M, @comm _ Eq, mk'_eq_zero_iff]
  exact ⟨⟨x, hx⟩, by 

Proof state:
R : Type u_1
inst✝¹⁰ : CommRing R
M : Submonoid R
S✝ : Type u_2
inst✝⁹ : CommRing S✝
inst✝⁸ : IsDomain R
S : Type u_3
T : Type u_4
inst✝⁷ : CommRing S
inst✝⁶ : CommRing T
inst✝⁵ : Algebra R S
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsFractionRing R T
this✝ : Nontrivial T
this : Nontrivial S
x : R
hx : x ∈ M
hx' : x = 0
⊢ ↑{ val := x, property := hx } * 1 = 0

Next tactic:
simp [hx']
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  

Proof state:
⊢ UnivLE.{u, v} ↔ univ.{u, v + 1} ≤ univ.{v, u + 1}

Next tactic:
rw [← not_iff_not, UnivLE]
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; 

Proof state:
⊢ (¬∀ (α : Type u), Small.{v, u} α) ↔ ¬univ.{u, v + 1} ≤ univ.{v, u + 1}

Next tactic:
simp_rw [small_iff_lift_mk_lt_univ]
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; 

Proof state:
⊢ (¬∀ (α : Type u), lift.{v + 1, u} #α < univ.{v, max u (v + 1)}) ↔ ¬univ.{u, v + 1} ≤ univ.{v, u + 1}

Next tactic:
push_neg
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  

Proof state:
⊢ (∃ α, univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α) ↔ univ.{v, u + 1} < univ.{u, v + 1}

Next tactic:
refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
  · 

Proof state:
case refine_1
x✝ : ∃ α, univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α
α : Type u
le : univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α
⊢ univ.{v, u + 1} < univ.{u, v + 1}

Next tactic:
rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
  · rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
    

Proof state:
case refine_1
x✝ : ∃ α, univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α
α : Type u
le : univ.{v, u + 1} ≤ lift.{max (v + 1) (u + 1), u} #α
⊢ univ.{v, u + 1} < univ.{u, v + 1}

Next tactic:
exact le.trans_lt (lift_lt_univ'.{u,v+1} #α)
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
  · rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
    exact le.trans_lt (lift_lt_univ'.{u,v+1} #α)
  · 

Proof state:
case refine_2
h : univ.{v, u + 1} < univ.{u, v + 1}
⊢ ∃ α, univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α

Next tactic:
obtain ⟨⟨α⟩, h⟩ := lt_univ'.mp h
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
  · rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
    exact le.trans_lt (lift_lt_univ'.{u,v+1} #α)
  · obtain ⟨⟨α⟩, h⟩ := lt_univ'.mp h; 

Proof state:
case refine_2.intro.mk
h✝ : univ.{v, u + 1} < univ.{u, v + 1}
w✝ : Cardinal.{u}
α : Type u
h : univ.{v, u + 1} = lift.{max (u + 1) (v + 1), u} (Quot.mk Setoid.r α)
⊢ ∃ α, univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α

Next tactic:
use α
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
  · rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
    exact le.trans_lt (lift_lt_univ'.{u,v+1} #α)
  · obtain ⟨⟨α⟩, h⟩ := lt_univ'.mp h; use α
    

Proof state:
case h
h✝ : univ.{v, u + 1} < univ.{u, v + 1}
w✝ : Cardinal.{u}
α : Type u
h : univ.{v, u + 1} = lift.{max (u + 1) (v + 1), u} (Quot.mk Setoid.r α)
⊢ univ.{v, max u (v + 1)} ≤ lift.{v + 1, u} #α

Next tactic:
rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift]
theorem univLE_iff_cardinal_le : UnivLE.{u, v} ↔ univ.{u, v+1} ≤ univ.{v, u+1} := by
  rw [← not_iff_not, UnivLE]; simp_rw [small_iff_lift_mk_lt_univ]; push_neg
  -- strange: simp_rw [univ_umax.{v,u}] doesn't work
  refine ⟨fun ⟨α, le⟩ ↦ ?_, fun h ↦ ?_⟩
  · rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift] at le
    exact le.trans_lt (lift_lt_univ'.{u,v+1} #α)
  · obtain ⟨⟨α⟩, h⟩ := lt_univ'.mp h; use α
    rw [univ_umax.{v,u}, ← lift_le.{u+1}, lift_univ, lift_lift]
    

Proof state:
case h
h✝ : univ.{v, u + 1} < univ.{u, v + 1}
w✝ : Cardinal.{u}
α : Type u
h : univ.{v, u + 1} = lift.{max (u + 1) (v + 1), u} (Quot.mk Setoid.r α)
⊢ univ.{v, u + 1} ≤ lift.{max (v + 1) (u + 1), u} #α

Next tactic:
exact h.le
/-- Together with transitivity, this shows UnivLE "IsTotalPreorder". -/
theorem univLE_total : UnivLE.{u, v} ∨ UnivLE.{v, u} := by
  

Proof state:
⊢ UnivLE.{u, v} ∨ UnivLE.{v, u}

Next tactic:
simp_rw [univLE_iff_cardinal_le]
/-- Together with transitivity, this shows UnivLE "IsTotalPreorder". -/
theorem univLE_total : UnivLE.{u, v} ∨ UnivLE.{v, u} := by
  simp_rw [univLE_iff_cardinal_le]; 

Proof state:
⊢ univ.{u, v + 1} ≤ univ.{v, u + 1} ∨ univ.{v, u + 1} ≤ univ.{u, v + 1}

Next tactic:
apply le_total
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ ((fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X)) X✝).one ≫ A.X.map f =
    ((fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X)) Y✝).one

Next tactic:
rw [← A.one.naturality, tensorUnit_map]
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ 𝟙 (𝟙_ D) ≫ A.one.app Y✝ = ((fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X)) Y✝).one

Next tactic:
dsimp
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ 𝟙 (𝟙_ D) ≫ A.one.app Y✝ = A.one.app Y✝

Next tactic:
rw [Category.id_comp]
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; rw [Category.id_comp]
      mul_hom := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ ((fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X)) X✝).mul ≫ A.X.map f =
    (A.X.map f ⊗ A.X.map f) ≫ ((fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X)) Y✝).mul

Next tactic:
dsimp
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; rw [Category.id_comp]
      mul_hom := by dsimp; 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X✝ Y✝ : C
f : X✝ ⟶ Y✝
⊢ A.mul.app X✝ ≫ A.X.map f = (A.X.map f ⊗ A.X.map f) ≫ A.mul.app Y✝

Next tactic:
rw [← A.mul.naturality, tensorObj_map]
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; rw [Category.id_comp]
      mul_hom := by dsimp; rw [← A.mul.naturality, tensorObj_map] }
  map_id X := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X : C
⊢ { obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X), map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.map
      (𝟙 X) =
    𝟙
      ({ obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X),
            map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.obj
        X)

Next tactic:
ext
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; rw [Category.id_comp]
      mul_hom := by dsimp; rw [← A.mul.naturality, tensorObj_map] }
  map_id X := by ext; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X : C
⊢ ({ obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X),
            map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.map
        (𝟙 X)).hom =
    (𝟙
        ({ obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X),
              map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.obj
          X)).hom

Next tactic:
dsimp
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; rw [Category.id_comp]
      mul_hom := by dsimp; rw [← A.mul.naturality, tensorObj_map] }
  map_id X := by ext; dsimp; 

Proof state:
case w
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X : C
⊢ A.X.map (𝟙 X) = 𝟙 (A.X.obj X)

Next tactic:
rw [CategoryTheory.Functor.map_id]
/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def Functor.obj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D where
  obj X :=
    { X := A.X.obj X
      one := A.one.app X
      mul := A.mul.app X
      one_mul := congr_app A.one_mul X
      mul_one := congr_app A.mul_one X
      mul_assoc := congr_app A.mul_assoc X }
  map f :=
    { hom := A.X.map f
      one_hom := by rw [← A.one.naturality, tensorUnit_map]; dsimp; rw [Category.id_comp]
      mul_hom := by dsimp; rw [← A.mul.naturality, tensorObj_map] }
  map_id X := by ext; dsimp; rw [CategoryTheory.Functor.map_id]
  map_comp f g := by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
A : Mon_ (C ⥤ D)
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ { obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X), map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.map
      (f ≫ g) =
    { obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X),
            map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.map
        f ≫
      { obj := fun X => Mon_.mk (A.X.obj X) (A.one.app X) (A.mul.app X),
            map := fun {X Y} f => Mon_.Hom.mk (A.X.map f) }.map
        g

Next tactic:
ext