l3lab/ntp-mathlib huggingface dataset:
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    

Proof state:
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
⊢ Ideal.span {a} ≠ ⊤

Next tactic:
intro H
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    

Proof state:
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
H : Ideal.span {a} = ⊤
⊢ False

Next tactic:
rw [Ideal.span_singleton_eq_top] at H
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    rw [Ideal.span_singleton_eq_top] at H
    

Proof state:
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
H : IsUnit a
⊢ False

Next tactic:
contradiction
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    rw [Ideal.span_singleton_eq_top] at H
    contradiction
  

Proof state:
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
this : Ideal.span {a} ≠ ⊤
⊢ ∃ I, Ideal.IsMaximal I ∧ a ∈ I

Next tactic:
rcases Ideal.exists_le_maximal _ this with ⟨I, Imax, H⟩
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    rw [Ideal.span_singleton_eq_top] at H
    contradiction
  rcases Ideal.exists_le_maximal _ this with ⟨I, Imax, H⟩
  

Proof state:
case intro.intro
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
this : Ideal.span {a} ≠ ⊤
I : Ideal α
Imax : Ideal.IsMaximal I
H : Ideal.span {a} ≤ I
⊢ ∃ I, Ideal.IsMaximal I ∧ a ∈ I

Next tactic:
use I, Imax
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    rw [Ideal.span_singleton_eq_top] at H
    contradiction
  rcases Ideal.exists_le_maximal _ this with ⟨I, Imax, H⟩
  use I, Imax
  

Proof state:
case right
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
this : Ideal.span {a} ≠ ⊤
I : Ideal α
Imax : Ideal.IsMaximal I
H : Ideal.span {a} ≤ I
⊢ a ∈ I

Next tactic:
apply H
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    rw [Ideal.span_singleton_eq_top] at H
    contradiction
  rcases Ideal.exists_le_maximal _ this with ⟨I, Imax, H⟩
  use I, Imax
  apply H
  

Proof state:
case right.a
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
this : Ideal.span {a} ≠ ⊤
I : Ideal α
Imax : Ideal.IsMaximal I
H : Ideal.span {a} ≤ I
⊢ a ∈ Ideal.span {a}

Next tactic:
apply Ideal.subset_span
theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I := by
  have : Ideal.span ({a} : Set α) ≠ ⊤ := by
    intro H
    rw [Ideal.span_singleton_eq_top] at H
    contradiction
  rcases Ideal.exists_le_maximal _ this with ⟨I, Imax, H⟩
  use I, Imax
  apply H
  apply Ideal.subset_span
  

Proof state:
case right.a.a
α : Type u
β : Type v
a b : α
inst✝ : CommSemiring α
h : a ∈ nonunits α
this : Ideal.span {a} ≠ ⊤
I : Ideal α
Imax : Ideal.IsMaximal I
H : Ideal.span {a} ≤ I
⊢ a ∈ {a}

Next tactic:
exact Set.mem_singleton a
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    

Proof state:
L R : Type w
fst snd : R → L
⊢ ∀ {X Y : WalkingMulticospan fst snd} (f : X ⟶ Y), 𝟙 X ≫ f = f

Next tactic:
rintro (_ | _) (_ | _) (_ | _ | _)
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.left.id
L R : Type w
fst snd : R → L
a✝ : L
⊢ 𝟙 (left a✝) ≫ Hom.id (left a✝) = Hom.id (left a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.fst
L R : Type w
fst snd : R → L
a✝ : R
⊢ 𝟙 (left (fst a✝)) ≫ Hom.fst a✝ = Hom.fst a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.snd
L R : Type w
fst snd : R → L
a✝ : R
⊢ 𝟙 (left (snd a✝)) ≫ Hom.snd a✝ = Hom.snd a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case right.right.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ 𝟙 (right a✝) ≫ Hom.id (right a✝) = Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    

Proof state:
L R : Type w
fst snd : R → L
⊢ ∀ {X Y : WalkingMulticospan fst snd} (f : X ⟶ Y), f ≫ 𝟙 Y = f

Next tactic:
rintro (_ | _) (_ | _) (_ | _ | _)
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.left.id
L R : Type w
fst snd : R → L
a✝ : L
⊢ Hom.id (left a✝) ≫ 𝟙 (left a✝) = Hom.id (left a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.fst
L R : Type w
fst snd : R → L
a✝ : R
⊢ Hom.fst a✝ ≫ 𝟙 (right a✝) = Hom.fst a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.snd
L R : Type w
fst snd : R → L
a✝ : R
⊢ Hom.snd a✝ ≫ 𝟙 (right a✝) = Hom.snd a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case right.right.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ Hom.id (right a✝) ≫ 𝟙 (right a✝) = Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    

Proof state:
L R : Type w
fst snd : R → L
⊢ ∀ {W X Y Z : WalkingMulticospan fst snd} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _)
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.left.left.id.id.id
L R : Type w
fst snd : R → L
a✝ : L
⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.id (left a✝) = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.id (left a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.left.right.id.id.fst
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.id (left (fst a✝)) ≫ Hom.id (left (fst a✝))) ≫ Hom.fst a✝ =
    Hom.id (left (fst a✝)) ≫ Hom.id (left (fst a✝)) ≫ Hom.fst a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.left.right.id.id.snd
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.id (left (snd a✝)) ≫ Hom.id (left (snd a✝))) ≫ Hom.snd a✝ =
    Hom.id (left (snd a✝)) ≫ Hom.id (left (snd a✝)) ≫ Hom.snd a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.right.right.id.fst.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.id (left (fst a✝)) ≫ Hom.fst a✝) ≫ Hom.id (right a✝) = Hom.id (left (fst a✝)) ≫ Hom.fst a✝ ≫ Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.right.right.id.snd.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.id (left (snd a✝)) ≫ Hom.snd a✝) ≫ Hom.id (right a✝) = Hom.id (left (snd a✝)) ≫ Hom.snd a✝ ≫ Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.right.right.right.fst.id.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.fst a✝ ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) = Hom.fst a✝ ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.right.right.right.snd.id.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.snd a✝ ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) = Hom.snd a✝ ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMulticospan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case right.right.right.right.id.id.id
L R : Type w
fst snd : R → L
a✝ : R
⊢ (Hom.id (right a✝) ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) =
    Hom.id (right a✝) ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    

Proof state:
L R : Type v
fst snd : L → R
⊢ ∀ {X Y : WalkingMultispan fst snd} (f : X ⟶ Y), 𝟙 X ≫ f = f

Next tactic:
rintro (_ | _) (_ | _) (_ | _ | _)
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.left.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ 𝟙 (left a✝) ≫ Hom.id (left a✝) = Hom.id (left a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.fst
L R : Type v
fst snd : L → R
a✝ : L
⊢ 𝟙 (left a✝) ≫ Hom.fst a✝ = Hom.fst a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.snd
L R : Type v
fst snd : L → R
a✝ : L
⊢ 𝟙 (left a✝) ≫ Hom.snd a✝ = Hom.snd a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case right.right.id
L R : Type v
fst snd : L → R
a✝ : R
⊢ 𝟙 (right a✝) ≫ Hom.id (right a✝) = Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    

Proof state:
L R : Type v
fst snd : L → R
⊢ ∀ {X Y : WalkingMultispan fst snd} (f : X ⟶ Y), f ≫ 𝟙 Y = f

Next tactic:
rintro (_ | _) (_ | _) (_ | _ | _)
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.left.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ Hom.id (left a✝) ≫ 𝟙 (left a✝) = Hom.id (left a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.fst
L R : Type v
fst snd : L → R
a✝ : L
⊢ Hom.fst a✝ ≫ 𝟙 (right (fst a✝)) = Hom.fst a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case left.right.snd
L R : Type v
fst snd : L → R
a✝ : L
⊢ Hom.snd a✝ ≫ 𝟙 (right (snd a✝)) = Hom.snd a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> 

Proof state:
case right.right.id
L R : Type v
fst snd : L → R
a✝ : R
⊢ Hom.id (right a✝) ≫ 𝟙 (right a✝) = Hom.id (right a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    

Proof state:
L R : Type v
fst snd : L → R
⊢ ∀ {W X Y Z : WalkingMultispan fst snd} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h

Next tactic:
rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _)
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.left.left.id.id.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.id (left a✝) = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.id (left a✝)

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.left.right.id.id.fst
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.fst a✝ = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.fst a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.left.right.id.id.snd
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.id (left a✝) ≫ Hom.id (left a✝)) ≫ Hom.snd a✝ = Hom.id (left a✝) ≫ Hom.id (left a✝) ≫ Hom.snd a✝

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.right.right.id.fst.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.id (left a✝) ≫ Hom.fst a✝) ≫ Hom.id (right (fst a✝)) = Hom.id (left a✝) ≫ Hom.fst a✝ ≫ Hom.id (right (fst a✝))

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.left.right.right.id.snd.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.id (left a✝) ≫ Hom.snd a✝) ≫ Hom.id (right (snd a✝)) = Hom.id (left a✝) ≫ Hom.snd a✝ ≫ Hom.id (right (snd a✝))

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.right.right.right.fst.id.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.fst a✝ ≫ Hom.id (right (fst a✝))) ≫ Hom.id (right (fst a✝)) =
    Hom.fst a✝ ≫ Hom.id (right (fst a✝)) ≫ Hom.id (right (fst a✝))

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case left.right.right.right.snd.id.id
L R : Type v
fst snd : L → R
a✝ : L
⊢ (Hom.snd a✝ ≫ Hom.id (right (snd a✝))) ≫ Hom.id (right (snd a✝)) =
    Hom.snd a✝ ≫ Hom.id (right (snd a✝)) ≫ Hom.id (right (snd a✝))

Next tactic:
rfl
instance : SmallCategory (WalkingMultispan fst snd) where
  Hom := Hom
  id := Hom.id
  comp := Hom.comp
  id_comp := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  comp_id := by
    rintro (_ | _) (_ | _) (_ | _ | _) <;> rfl
  assoc := by
    rintro (_ | _) (_ | _) (_ | _) (_ | _) (_ | _ | _) (_ | _ | _) (_ | _ | _) <;> 

Proof state:
case right.right.right.right.id.id.id
L R : Type v
fst snd : L → R
a✝ : R
⊢ (Hom.id (right a✝) ≫ Hom.id (right a✝)) ≫ Hom.id (right a✝) =
    Hom.id (right a✝) ≫ Hom.id (right a✝) ≫ Hom.id (right a✝)

Next tactic:
rfl
/-- The multicospan associated to `I : MulticospanIndex`. -/
def multicospan : WalkingMulticospan I.fstTo I.sndTo ⥤ C where
  obj x :=
    match x with
    | WalkingMulticospan.left a => I.left a
    | WalkingMulticospan.right b => I.right b
  map {x y} f :=
    match x, y, f with
    | _, _, WalkingMulticospan.Hom.id x => 𝟙 _
    | _, _, WalkingMulticospan.Hom.fst b => I.fst _
    | _, _, WalkingMulticospan.Hom.snd b => I.snd _
  map_id := by
    

Proof state:
C : Type u
inst✝ : Category.{v, u} C
I : MulticospanIndex C
⊢ ∀ (X : WalkingMulticospan I.fstTo I.sndTo),
    {
            obj := fun x =>
              match x with
              | WalkingMulticospan.left a => left I a
              | WalkingMulticospan.right b => right I b,
            map := fun {x y} f =>
              match x, y, f with
              | x, .(x), WalkingMulticospan.Hom.id .(x) =>
                𝟙
                  ((fun x =>
                      match x with
                      | WalkingMulticospan.left a => left I a
                      | WalkingMulticospan.right b => right I b)
                    x)
              | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>
                fst I b
              | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>
                snd I b }.map
        (𝟙 X) =
      𝟙
        ({
              obj := fun x =>
                match x with
                | WalkingMulticospan.left a => left I a
                | WalkingMulticospan.right b => right I b,
              map := fun {x y} f =>
                match x, y, f with
                | x, .(x), WalkingMulticospan.Hom.id .(x) =>
                  𝟙
                    ((fun x =>
                        match x with
                        | WalkingMulticospan.left a => left I a
                        | WalkingMulticospan.right b => right I b)
                      x)
                | .(WalkingMulticospan.left (fstTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.fst b =>
                  fst I b
                | .(WalkingMulticospan.left (sndTo I b)), .(WalkingMulticospan.right b), WalkingMulticospan.Hom.snd b =>
                  snd I b }.obj
          X)

Next tactic:
rintro (_ | _)