l3lab/ntp-mathlib huggingface dataset:
instance : Sub (BilinForm R₁ M₁) where
  sub B D :=
    { bilin := fun x y => B x y - D x y
      bilin_add_left := fun x y z => by simp only [add_left, add_left, add_sub_add_comm]
      bilin_smul_left := fun a x y => by 

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁸ : Semiring R
inst✝¹⁷ : AddCommMonoid M
inst✝¹⁶ : Module R M
S : Type u_3
inst✝¹⁵ : CommSemiring S
inst✝¹⁴ : Algebra S R
inst✝¹³ : Module S M
inst✝¹² : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹¹ : Ring R₁
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁸ : CommSemiring R₂
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁵ : CommRing R₃
inst✝⁴ : AddCommGroup M₃
inst✝³ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D✝ : BilinForm R M
D₁ B D : BilinForm R₁ M₁
a : R₁
x y : M₁
⊢ (fun x y => bilin B x y - bilin D x y) (a • x) y = a * (fun x y => bilin B x y - bilin D x y) x y

Next tactic:
simp only [smul_left, smul_left, mul_sub]
instance : Sub (BilinForm R₁ M₁) where
  sub B D :=
    { bilin := fun x y => B x y - D x y
      bilin_add_left := fun x y z => by simp only [add_left, add_left, add_sub_add_comm]
      bilin_smul_left := fun a x y => by simp only [smul_left, smul_left, mul_sub]
      bilin_add_right := fun x y z => by 

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁸ : Semiring R
inst✝¹⁷ : AddCommMonoid M
inst✝¹⁶ : Module R M
S : Type u_3
inst✝¹⁵ : CommSemiring S
inst✝¹⁴ : Algebra S R
inst✝¹³ : Module S M
inst✝¹² : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹¹ : Ring R₁
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁸ : CommSemiring R₂
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁵ : CommRing R₃
inst✝⁴ : AddCommGroup M₃
inst✝³ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D✝ : BilinForm R M
D₁ B D : BilinForm R₁ M₁
x y z : M₁
⊢ (fun x y => bilin B x y - bilin D x y) x (y + z) =
    (fun x y => bilin B x y - bilin D x y) x y + (fun x y => bilin B x y - bilin D x y) x z

Next tactic:
simp only [add_right, add_right, add_sub_add_comm]
instance : Sub (BilinForm R₁ M₁) where
  sub B D :=
    { bilin := fun x y => B x y - D x y
      bilin_add_left := fun x y z => by simp only [add_left, add_left, add_sub_add_comm]
      bilin_smul_left := fun a x y => by simp only [smul_left, smul_left, mul_sub]
      bilin_add_right := fun x y z => by simp only [add_right, add_right, add_sub_add_comm]
      bilin_smul_right := fun a x y => by 

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁸ : Semiring R
inst✝¹⁷ : AddCommMonoid M
inst✝¹⁶ : Module R M
S : Type u_3
inst✝¹⁵ : CommSemiring S
inst✝¹⁴ : Algebra S R
inst✝¹³ : Module S M
inst✝¹² : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹¹ : Ring R₁
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁸ : CommSemiring R₂
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁵ : CommRing R₃
inst✝⁴ : AddCommGroup M₃
inst✝³ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D✝ : BilinForm R M
D₁ B D : BilinForm R₁ M₁
a : R₁
x y : M₁
⊢ (fun x y => bilin B x y - bilin D x y) x (a • y) = a * (fun x y => bilin B x y - bilin D x y) x y

Next tactic:
simp only [smul_right, smul_right, mul_sub]
/-- Auxiliary construction for the flip of a bilinear form, obtained by exchanging the left and
right arguments. This version is a `LinearMap`; it is later upgraded to a `LinearEquiv`
in `flipHom`. -/
def flipHomAux [Algebra R₂ R] : BilinForm R M →ₗ[R₂] BilinForm R M where
  toFun A :=
    { bilin := fun i j => A j i
      bilin_add_left := fun x y z => A.bilin_add_right z x y
      bilin_smul_left := fun a x y => A.bilin_smul_right a y x
      bilin_add_right := fun x y z => A.bilin_add_left y z x
      bilin_smul_right := fun a x y => A.bilin_smul_left a y x }
  map_add' A₁ A₂ := by
    

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
A₁ A₂ : BilinForm R M
⊢ (fun A =>
        { bilin := fun i j => bilin A j i,
          bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
          bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
          bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
          bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
      (A₁ + A₂) =
    (fun A =>
          { bilin := fun i j => bilin A j i,
            bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
            bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
            bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
            bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
        A₁ +
      (fun A =>
          { bilin := fun i j => bilin A j i,
            bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
            bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
            bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
            bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
        A₂

Next tactic:
ext
/-- Auxiliary construction for the flip of a bilinear form, obtained by exchanging the left and
right arguments. This version is a `LinearMap`; it is later upgraded to a `LinearEquiv`
in `flipHom`. -/
def flipHomAux [Algebra R₂ R] : BilinForm R M →ₗ[R₂] BilinForm R M where
  toFun A :=
    { bilin := fun i j => A j i
      bilin_add_left := fun x y z => A.bilin_add_right z x y
      bilin_smul_left := fun a x y => A.bilin_smul_right a y x
      bilin_add_right := fun x y z => A.bilin_add_left y z x
      bilin_smul_right := fun a x y => A.bilin_smul_left a y x }
  map_add' A₁ A₂ := by
    ext
    

Proof state:
case H
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
A₁ A₂ : BilinForm R M
x✝ y✝ : M
⊢ bilin
      ((fun A =>
          { bilin := fun i j => bilin A j i,
            bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
            bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
            bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
            bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
        (A₁ + A₂))
      x✝ y✝ =
    bilin
      ((fun A =>
            { bilin := fun i j => bilin A j i,
              bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
              bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
              bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
              bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
          A₁ +
        (fun A =>
            { bilin := fun i j => bilin A j i,
              bilin_add_left := (_ : ∀ (x y z : M), bilin A z (x + y) = bilin A z x + bilin A z y),
              bilin_smul_left := (_ : ∀ (a : R) (x y : M), bilin A y (a • x) = a * bilin A y x),
              bilin_add_right := (_ : ∀ (x y z : M), bilin A (y + z) x = bilin A y x + bilin A z x),
              bilin_smul_right := (_ : ∀ (a : R) (x y : M), bilin A (a • y) x = a * bilin A y x) })
          A₂)
      x✝ y✝

Next tactic:
simp
theorem flip_flip_aux [Algebra R₂ R] (A : BilinForm R M) :
    (flipHomAux R₂) (flipHomAux R₂ A) = A := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
A : BilinForm R M
⊢ (flipHomAux R₂) ((flipHomAux R₂) A) = A

Next tactic:
ext A
theorem flip_flip_aux [Algebra R₂ R] (A : BilinForm R M) :
    (flipHomAux R₂) (flipHomAux R₂ A) = A := by
  ext A
  

Proof state:
case H
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
A✝ : BilinForm R M
A y✝ : M
⊢ bilin ((flipHomAux R₂) ((flipHomAux R₂) A✝)) A y✝ = bilin A✝ A y✝

Next tactic:
simp [flipHomAux]
theorem flip_flip [Algebra R₂ R] :
    (flipHom R₂).trans (flipHom R₂) = LinearEquiv.refl R₂ (BilinForm R M) := by
  

Proof state:
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
⊢ flipHom R₂ ≪≫ₗ flipHom R₂ = LinearEquiv.refl R₂ (BilinForm R M)

Next tactic:
ext A
theorem flip_flip [Algebra R₂ R] :
    (flipHom R₂).trans (flipHom R₂) = LinearEquiv.refl R₂ (BilinForm R M) := by
  ext A
  

Proof state:
case h.H
R : Type u_1
M : Type u_2
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
S : Type u_3
inst✝¹⁶ : CommSemiring S
inst✝¹⁵ : Algebra S R
inst✝¹⁴ : Module S M
inst✝¹³ : IsScalarTower S R M
R₁ : Type u_4
M₁ : Type u_5
inst✝¹² : Ring R₁
inst✝¹¹ : AddCommGroup M₁
inst✝¹⁰ : Module R₁ M₁
R₂ : Type u_6
M₂ : Type u_7
inst✝⁹ : CommSemiring R₂
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : Module R₂ M₂
R₃ : Type u_8
M₃ : Type u_9
inst✝⁶ : CommRing R₃
inst✝⁵ : AddCommGroup M₃
inst✝⁴ : Module R₃ M₃
V : Type u_10
K : Type u_11
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
D : BilinForm R M
D₁ : BilinForm R₁ M₁
inst✝ : Algebra R₂ R
A : BilinForm R M
x✝ y✝ : M
⊢ bilin ((flipHom R₂ ≪≫ₗ flipHom R₂) A) x✝ y✝ = bilin ((LinearEquiv.refl R₂ (BilinForm R M)) A) x✝ y✝

Next tactic:
simp
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    

Proof state:
C : Cat
⊢ { obj := fun C => Quotient (isIsomorphicSetoid ↑C),
          map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map
      (𝟙 C) =
    𝟙
      ({ obj := fun C => Quotient (isIsomorphicSetoid ↑C),
            map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.obj
        C)

Next tactic:
dsimp
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; 

Proof state:
C : Cat
⊢ Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) =
    𝟙 (Quotient (isIsomorphicSetoid ↑C))

Next tactic:
apply funext
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; 

Proof state:
case h
C : Cat
⊢ ∀ (x : Quot Setoid.r),
    Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) x =
      𝟙 (Quotient (isIsomorphicSetoid ↑C)) x

Next tactic:
intro x
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    

Proof state:
case h
C : Cat
x : Quot Setoid.r
⊢ Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) x =
    𝟙 (Quotient (isIsomorphicSetoid ↑C)) x

Next tactic:
apply x.recOn
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · 

Proof state:
case h.h
C : Cat
x : Quot Setoid.r
⊢ ∀ (a b : ↑C) (p : Setoid.r a b),
    (_ :
        Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y))
            (Quot.mk Setoid.r b) =
          𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r b)) =
      (_ : ?m.1036 (Quot.mk Setoid.r b))

Next tactic:
intro _ _ p
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      

Proof state:
case h.h
C : Cat
x : Quot Setoid.r
a✝ b✝ : ↑C
p : Setoid.r a✝ b✝
⊢ (_ :
      Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) (Quot.mk Setoid.r b✝) =
        𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r b✝)) =
    (_ : ?m.1036 (Quot.mk Setoid.r b✝))

Next tactic:
simp only [types_id_apply]
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · 

Proof state:
case h.f
C : Cat
x : Quot Setoid.r
⊢ ∀ (a : ↑C),
    Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) (Quot.mk Setoid.r a) =
      𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r a)

Next tactic:
intro _
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · intro _
      

Proof state:
case h.f
C : Cat
x : Quot Setoid.r
a✝ : ↑C
⊢ Quot.map (𝟙 C).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r ((𝟙 C).obj X) ((𝟙 C).obj Y)) (Quot.mk Setoid.r a✝) =
    𝟙 (Quotient (isIsomorphicSetoid ↑C)) (Quot.mk Setoid.r a✝)

Next tactic:
rfl
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · intro _
      rfl
  map_comp {C D E} f g := by -- Porting note(s): idem
    

Proof state:
C D E : Cat
f : C ⟶ D
g : D ⟶ E
⊢ { obj := fun C => Quotient (isIsomorphicSetoid ↑C),
          map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map
      (f ≫ g) =
    { obj := fun C => Quotient (isIsomorphicSetoid ↑C),
            map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map
        f ≫
      { obj := fun C => Quotient (isIsomorphicSetoid ↑C),
            map := fun {C D} F => Quot.map F.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (F.obj X) (F.obj Y)) }.map
        g

Next tactic:
dsimp
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · intro _
      rfl
  map_comp {C D E} f g := by -- Porting note(s): idem
    dsimp; 

Proof state:
C D E : Cat
f : C ⟶ D
g : D ⟶ E
⊢ Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y))) =
    Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫
      Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y))

Next tactic:
apply funext
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · intro _
      rfl
  map_comp {C D E} f g := by -- Porting note(s): idem
    dsimp; apply funext; 

Proof state:
case h
C D E : Cat
f : C ⟶ D
g : D ⟶ E
⊢ ∀ (x : Quot Setoid.r),
    Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y))) x =
      (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫
          Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))
        x

Next tactic:
intro x
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · intro _
      rfl
  map_comp {C D E} f g := by -- Porting note(s): idem
    dsimp; apply funext; intro x
    

Proof state:
case h
C D E : Cat
f : C ⟶ D
g : D ⟶ E
x : Quot Setoid.r
⊢ Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y))) x =
    (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫
        Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))
      x

Next tactic:
apply x.recOn
/-- The functor that sends each category to the quotient space of its objects up to an isomorphism.
-/
def isomorphismClasses : Cat.{v, u} ⥤ Type u where
  obj C := Quotient (isIsomorphicSetoid C.α)
  map {C D} F := Quot.map F.obj fun X Y ⟨f⟩ => ⟨F.mapIso f⟩
  map_id {C} := by  -- Porting note: this used to be `tidy`
    dsimp; apply funext; intro x
    apply x.recOn  -- Porting note: `induction x` not working yet
    · intro _ _ p
      simp only [types_id_apply]
    · intro _
      rfl
  map_comp {C D E} f g := by -- Porting note(s): idem
    dsimp; apply funext; intro x
    apply x.recOn
    · 

Proof state:
case h.h
C D E : Cat
f : C ⟶ D
g : D ⟶ E
x : Quot Setoid.r
⊢ ∀ (a b : ↑C) (p : Setoid.r a b),
    (_ :
        Quot.map (f ≫ g).obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (g.obj (f.obj X)) (g.obj (f.obj Y)))
            (Quot.mk Setoid.r b) =
          (Quot.map f.obj (_ : ∀ (X Y : ↑C), Setoid.r X Y → Setoid.r (f.obj X) (f.obj Y)) ≫
              Quot.map g.obj (_ : ∀ (X Y : ↑D), Setoid.r X Y → Setoid.r (g.obj X) (g.obj Y)))
            (Quot.mk Setoid.r b)) =
      (_ : ?m.1373 (Quot.mk Setoid.r b))

Next tactic:
intro _ _ _