l3lab/ntp-mathlib huggingface dataset:
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := by
    ext x
    induction' x using Quot.inductionOn with x
    induction' x with j x x y hx hy
    · change _ = s.ι.app j _
      rw [← w j]
      rfl
    · rw [quot_one, map_one]
      rfl
    · 

Proof state:
case w.h.mul
J : Type v
inst✝ : SmallCategory J
F : J ⥤ MonCat
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x y : Prequotient F
hx : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
hy : m (Quot.mk Setoid.r y) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)
⊢ m (Quot.mk Setoid.r (mul x y)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (mul x y))

Next tactic:
rw [quot_mul, map_mul, hx, hy]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := by
    ext x
    induction' x using Quot.inductionOn with x
    induction' x with j x x y hx hy
    · change _ = s.ι.app j _
      rw [← w j]
      rfl
    · rw [quot_one, map_one]
      rfl
    · rw [quot_mul, map_mul, hx, hy]
      

Proof state:
case w.h.mul
J : Type v
inst✝ : SmallCategory J
F : J ⥤ MonCat
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x y : Prequotient F
hx : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
hy : m (Quot.mk Setoid.r y) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)
⊢ ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x) * ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y) =
    ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x * Quot.mk Setoid.r y)

Next tactic:
dsimp [descMorphism, FunLike.coe, descFun]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := by
    ext x
    induction' x using Quot.inductionOn with x
    induction' x with j x x y hx hy
    · change _ = s.ι.app j _
      rw [← w j]
      rfl
    · rw [quot_one, map_one]
      rfl
    · rw [quot_mul, map_mul, hx, hy]
      dsimp [descMorphism, FunLike.coe, descFun]
      

Proof state:
case w.h.mul
J : Type v
inst✝ : SmallCategory J
F : J ⥤ MonCat
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x y : Prequotient F
hx : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
hy : m (Quot.mk Setoid.r y) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)
⊢ descFunLift F s x * descFunLift F s y =
    Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)
      (Quot.mk Setoid.r x * Quot.mk Setoid.r y)

Next tactic:
simp only [← quot_mul, descFunLift]
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (a b c : RingAut R), a * b * c = a * (b * c)

Next tactic:
intros
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
a✝ b✝ c✝ : RingAut R
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)

Next tactic:
rfl
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (a : RingAut R), 1 * a = a

Next tactic:
intros
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by intros; 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
a✝ : RingAut R
⊢ 1 * a✝ = a✝

Next tactic:
rfl
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by intros; rfl
    mul_one := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (a : RingAut R), a * 1 = a

Next tactic:
intros
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by intros; rfl
    mul_one := by intros; 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
a✝ : RingAut R
⊢ a✝ * 1 = a✝

Next tactic:
rfl
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by intros; rfl
    mul_one := by intros; rfl
    mul_left_inv := by 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (a : RingAut R), a⁻¹ * a = 1

Next tactic:
intros
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by intros; rfl
    mul_one := by intros; rfl
    mul_left_inv := by intros; 

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
a✝ : RingAut R
⊢ a✝⁻¹ * a✝ = 1

Next tactic:
ext
/-- The group operation on automorphisms of a ring is defined by
`fun g h => RingEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance : Group (RingAut R) :=
  { mul := fun g h => RingEquiv.trans h g
    one := RingEquiv.refl R
    inv := RingEquiv.symm
    div := _
    npow := @npowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
    zpow :=
      @zpowRec _ ⟨RingEquiv.refl R⟩ ⟨fun g h => RingEquiv.trans h g⟩
        ⟨RingEquiv.symm⟩
    mul_assoc := by intros; rfl
    one_mul := by intros; rfl
    mul_one := by intros; rfl
    mul_left_inv := by intros; ext; 

Proof state:
case h
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
a✝ : RingAut R
x✝ : R
⊢ (a✝⁻¹ * a✝) x✝ = 1 x✝

Next tactic:
apply Equiv.left_inv
/-- Monoid homomorphism from ring automorphisms to additive automorphisms. -/
def toAddAut : RingAut R →* AddAut R := by
  

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingAut R →* AddAut R

Next tactic:
refine'
  { toFun := RingEquiv.toAddEquiv
    .. }
/-- Monoid homomorphism from ring automorphisms to additive automorphisms. -/
def toAddAut : RingAut R →* AddAut R := by
  refine'
  { toFun := RingEquiv.toAddEquiv
    .. } <;> (

Proof state:
case refine'_1
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingEquiv.toAddEquiv 1 = 1

Next tactic:
intros
/-- Monoid homomorphism from ring automorphisms to additive automorphisms. -/
def toAddAut : RingAut R →* AddAut R := by
  refine'
  { toFun := RingEquiv.toAddEquiv
    .. } <;> (intros; 

Proof state:
case refine'_1
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingEquiv.toAddEquiv 1 = 1

Next tactic:
rfl
/-- Monoid homomorphism from ring automorphisms to additive automorphisms. -/
def toAddAut : RingAut R →* AddAut R := by
  refine'
  { toFun := RingEquiv.toAddEquiv
    .. } <;> (

Proof state:
case refine'_2
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (x y : RingAut R),
    OneHom.toFun { toFun := RingEquiv.toAddEquiv, map_one' := (_ : RingEquiv.toAddEquiv 1 = RingEquiv.toAddEquiv 1) }
        (x * y) =
      OneHom.toFun { toFun := RingEquiv.toAddEquiv, map_one' := (_ : RingEquiv.toAddEquiv 1 = RingEquiv.toAddEquiv 1) }
          x *
        OneHom.toFun
          { toFun := RingEquiv.toAddEquiv, map_one' := (_ : RingEquiv.toAddEquiv 1 = RingEquiv.toAddEquiv 1) } y

Next tactic:
intros
/-- Monoid homomorphism from ring automorphisms to additive automorphisms. -/
def toAddAut : RingAut R →* AddAut R := by
  refine'
  { toFun := RingEquiv.toAddEquiv
    .. } <;> (intros; 

Proof state:
case refine'_2
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
x✝ y✝ : RingAut R
⊢ OneHom.toFun { toFun := RingEquiv.toAddEquiv, map_one' := (_ : RingEquiv.toAddEquiv 1 = RingEquiv.toAddEquiv 1) }
      (x✝ * y✝) =
    OneHom.toFun { toFun := RingEquiv.toAddEquiv, map_one' := (_ : RingEquiv.toAddEquiv 1 = RingEquiv.toAddEquiv 1) }
        x✝ *
      OneHom.toFun { toFun := RingEquiv.toAddEquiv, map_one' := (_ : RingEquiv.toAddEquiv 1 = RingEquiv.toAddEquiv 1) }
        y✝

Next tactic:
rfl
/-- Monoid homomorphism from ring automorphisms to multiplicative automorphisms. -/
def toMulAut : RingAut R →* MulAut R := by
  

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingAut R →* MulAut R

Next tactic:
refine'
  { toFun := RingEquiv.toMulEquiv
    .. }
/-- Monoid homomorphism from ring automorphisms to multiplicative automorphisms. -/
def toMulAut : RingAut R →* MulAut R := by
  refine'
  { toFun := RingEquiv.toMulEquiv
    .. } <;> (

Proof state:
case refine'_1
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingEquiv.toMulEquiv 1 = 1

Next tactic:
intros
/-- Monoid homomorphism from ring automorphisms to multiplicative automorphisms. -/
def toMulAut : RingAut R →* MulAut R := by
  refine'
  { toFun := RingEquiv.toMulEquiv
    .. } <;> (intros; 

Proof state:
case refine'_1
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingEquiv.toMulEquiv 1 = 1

Next tactic:
rfl
/-- Monoid homomorphism from ring automorphisms to multiplicative automorphisms. -/
def toMulAut : RingAut R →* MulAut R := by
  refine'
  { toFun := RingEquiv.toMulEquiv
    .. } <;> (

Proof state:
case refine'_2
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (x y : RingAut R),
    OneHom.toFun { toFun := RingEquiv.toMulEquiv, map_one' := (_ : RingEquiv.toMulEquiv 1 = RingEquiv.toMulEquiv 1) }
        (x * y) =
      OneHom.toFun { toFun := RingEquiv.toMulEquiv, map_one' := (_ : RingEquiv.toMulEquiv 1 = RingEquiv.toMulEquiv 1) }
          x *
        OneHom.toFun
          { toFun := RingEquiv.toMulEquiv, map_one' := (_ : RingEquiv.toMulEquiv 1 = RingEquiv.toMulEquiv 1) } y

Next tactic:
intros
/-- Monoid homomorphism from ring automorphisms to multiplicative automorphisms. -/
def toMulAut : RingAut R →* MulAut R := by
  refine'
  { toFun := RingEquiv.toMulEquiv
    .. } <;> (intros; 

Proof state:
case refine'_2
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
x✝ y✝ : RingAut R
⊢ OneHom.toFun { toFun := RingEquiv.toMulEquiv, map_one' := (_ : RingEquiv.toMulEquiv 1 = RingEquiv.toMulEquiv 1) }
      (x✝ * y✝) =
    OneHom.toFun { toFun := RingEquiv.toMulEquiv, map_one' := (_ : RingEquiv.toMulEquiv 1 = RingEquiv.toMulEquiv 1) }
        x✝ *
      OneHom.toFun { toFun := RingEquiv.toMulEquiv, map_one' := (_ : RingEquiv.toMulEquiv 1 = RingEquiv.toMulEquiv 1) }
        y✝

Next tactic:
rfl
/-- Monoid homomorphism from ring automorphisms to permutations. -/
def toPerm : RingAut R →* Equiv.Perm R := by
  

Proof state:
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ RingAut R →* Equiv.Perm R

Next tactic:
refine'
  { toFun := RingEquiv.toEquiv
    .. }
/-- Monoid homomorphism from ring automorphisms to permutations. -/
def toPerm : RingAut R →* Equiv.Perm R := by
  refine'
  { toFun := RingEquiv.toEquiv
    .. } <;> (

Proof state:
case refine'_1
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ 1.toEquiv = 1

Next tactic:
intros
/-- Monoid homomorphism from ring automorphisms to permutations. -/
def toPerm : RingAut R →* Equiv.Perm R := by
  refine'
  { toFun := RingEquiv.toEquiv
    .. } <;> (intros; 

Proof state:
case refine'_1
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ 1.toEquiv = 1

Next tactic:
rfl
/-- Monoid homomorphism from ring automorphisms to permutations. -/
def toPerm : RingAut R →* Equiv.Perm R := by
  refine'
  { toFun := RingEquiv.toEquiv
    .. } <;> (

Proof state:
case refine'_2
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
⊢ ∀ (x y : RingAut R),
    OneHom.toFun { toFun := RingEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } (x * y) =
      OneHom.toFun { toFun := RingEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } x *
        OneHom.toFun { toFun := RingEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } y

Next tactic:
intros
/-- Monoid homomorphism from ring automorphisms to permutations. -/
def toPerm : RingAut R →* Equiv.Perm R := by
  refine'
  { toFun := RingEquiv.toEquiv
    .. } <;> (intros; 

Proof state:
case refine'_2
R : Type u_1
inst✝¹ : Mul R
inst✝ : Add R
x✝ y✝ : RingAut R
⊢ OneHom.toFun { toFun := RingEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } (x✝ * y✝) =
    OneHom.toFun { toFun := RingEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } x✝ *
      OneHom.toFun { toFun := RingEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } y✝

Next tactic:
rfl
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        

Proof state:
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
⊢ ∀ (a₁ a₂ b₁ b₂ : K),
    Setoid.r a₁ b₁ → Setoid.r a₂ b₂ → (fun a b => ∃ c, c • b = a) a₁ a₂ = (fun a b => ∃ c, c • b = a) b₁ b₂

Next tactic:
rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; 

Proof state:
case intro.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d) = (fun a b => ∃ c, c • b = a) a b

Next tactic:
ext
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        

Proof state:
case intro.intro.a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d) ↔ (fun a b => ∃ c, c • b = a) a b

Next tactic:
constructor
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · 

Proof state:
case intro.intro.a.mp
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d) → (fun a b => ∃ c, c • b = a) a b

Next tactic:
rintro ⟨e, he⟩
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; 

Proof state:
case intro.intro.a.mp.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • (fun m => m • b) d = (fun m => m • a) c
⊢ ∃ c, c • b = a

Next tactic:
use (c⁻¹ : Aˣ) * e * d
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          

Proof state:
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • (fun m => m • b) d = (fun m => m • a) c
⊢ (↑c⁻¹ * e * ↑d) • b = a

Next tactic:
apply_fun fun t => c⁻¹ • t at he
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          

Proof state:
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : c⁻¹ • e • (fun m => m • b) d = c⁻¹ • (fun m => m • a) c
⊢ (↑c⁻¹ * e * ↑d) • b = a

Next tactic:
simpa [mul_smul] using he
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · 

Proof state:
case intro.intro.a.mpr
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) a b → (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d)

Next tactic:
rintro ⟨e, he⟩
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · rintro ⟨e, he⟩; 

Proof state:
case intro.intro.a.mpr.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ∃ c_1, c_1 • (fun m => m • b) d = (fun m => m • a) c

Next tactic:
dsimp
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · rintro ⟨e, he⟩; dsimp
          

Proof state:
case intro.intro.a.mpr.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ∃ c_1, c_1 • d • b = c • a

Next tactic:
use (d⁻¹ : Aˣ) * c * e
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · rintro ⟨e, he⟩; dsimp
          use (d⁻¹ : Aˣ) * c * e
          

Proof state:
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ (↑d⁻¹ * ↑c * e) • d • b = c • a

Next tactic:
erw [← he, ← mul_smul, ← mul_smul]
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · rintro ⟨e, he⟩; dsimp
          use (d⁻¹ : Aˣ) * c * e
          erw [← he, ← mul_smul, ← mul_smul]
          

Proof state:
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ (↑d⁻¹ * ↑c * e * ↑d) • b = (↑c * e) • b

Next tactic:
congr 1
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · rintro ⟨e, he⟩; dsimp
          use (d⁻¹ : Aˣ) * c * e
          erw [← he, ← mul_smul, ← mul_smul]
          congr 1
          

Proof state:
case h.e_a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ↑d⁻¹ * ↑c * e * ↑d = ↑c * e

Next tactic:
rw [mul_comm]
instance : LE (ValueGroup A K) :=
  LE.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => ∃ c : A, c • b = a)
      (by
        rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩; ext
        constructor
        · rintro ⟨e, he⟩; use (c⁻¹ : Aˣ) * e * d
          apply_fun fun t => c⁻¹ • t at he
          simpa [mul_smul] using he
        · rintro ⟨e, he⟩; dsimp
          use (d⁻¹ : Aˣ) * c * e
          erw [← he, ← mul_smul, ← mul_smul]
          congr 1
          rw [mul_comm]
          

Proof state:
case h.e_a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ↑d * (↑d⁻¹ * ↑c * e) = ↑c * e

Next tactic:
simp only [← mul_assoc, ← Units.val_mul, mul_inv_self, one_mul]
instance : Mul (ValueGroup A K) :=
  Mul.mk fun x y =>
    Quotient.liftOn₂' x y (fun a b => Quotient.mk'' <| a * b)
      (by
        

Proof state:
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
⊢ ∀ (a₁ a₂ b₁ b₂ : K),
    Setoid.r a₁ b₁ →
      Setoid.r a₂ b₂ → (fun a b => Quotient.mk'' (a * b)) a₁ a₂ = (fun a b => Quotient.mk'' (a * b)) b₁ b₂

Next tactic:
rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩