/-- Given a map from a rack to a group, lift it to being a map from the enveloping group.
More precisely, the `EnvelGroup` functor is left adjoint to `Quandle.Conj`.
-/
def toEnvelGroup.map {R : Type*} [Rack R] {G : Type*} [Group G] :
    (R →◃ Quandle.Conj G) ≃ (EnvelGroup R →* G)
    where
  toFun f :=
    { toFun := fun x =>
        Quotient.liftOn x (toEnvelGroup.mapAux f) fun a b ⟨hab⟩ =>
          toEnvelGroup.mapAux.well_def f hab
      map_one' := by
        change Quotient.liftOn ⟦Rack.PreEnvelGroup.unit⟧ (toEnvelGroup.mapAux f) _ = 1
        simp only [Quotient.lift_mk, mapAux]
      map_mul' := fun x y =>
        Quotient.inductionOn₂ x y fun x y => by
          simp only [toEnvelGroup.mapAux]
          change Quotient.liftOn ⟦mul x y⟧ (toEnvelGroup.mapAux f) _ = _
          simp [toEnvelGroup.mapAux] }
  invFun F := (Quandle.Conj.map F).comp (toEnvelGroup R)
  left_inv f := by ext; rfl
  right_inv F :=
    MonoidHom.ext fun x =>
      Quotient.inductionOn x fun x => by
        induction' x with _ x y ih_x ih_y x ih_x
        · exact F.map_one.symm
        · rfl
        · have hm : ⟦x.mul y⟧ = @Mul.mul (EnvelGroup R) _ ⟦x⟧ ⟦y⟧ := rfl
          simp only [MonoidHom.coe_mk, OneHom.coe_mk, Quotient.lift_mk]
          suffices ∀ x y, F (Mul.mul x y) = F (x) * F (y) by
            simp_all only [MonoidHom.coe_mk, OneHom.coe_mk, Quotient.lift_mk, hm]
            rw [← ih_x, ← ih_y, mapAux]
          exact F.map_mul
        · have hm : ⟦x.inv⟧ = @Inv.inv (EnvelGroup R) _ ⟦x⟧ := rfl
          

Proof state:
case inv
R : Type u_1
inst✝¹ : Rack R
G : Type u_2
inst✝ : Group G
F : EnvelGroup R →* G
x✝ : EnvelGroup R
x : PreEnvelGroup R
ih_x :
  ((fun f =>
          {
            toOneHom :=
              {
                toFun := fun x =>
                  Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                map_one' :=
                  (_ :
                    Quotient.liftOn ⟦unit⟧ (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                      1) },
            map_mul' :=
              (_ :
                ∀ (x y : EnvelGroup R),
                  OneHom.toFun
                      {
                        toFun := fun x =>
                          Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                        map_one' :=
                          (_ :
                            Quotient.liftOn ⟦unit⟧ (mapAux f)
                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                              1) }
                      (x * y) =
                    OneHom.toFun
                        {
                          toFun := fun x =>
                            Quotient.liftOn x (mapAux f)
                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                          map_one' :=
                            (_ :
                              Quotient.liftOn ⟦unit⟧ (mapAux f)
                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                                1) }
                        x *
                      OneHom.toFun
                        {
                          toFun := fun x =>
                            Quotient.liftOn x (mapAux f)
                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                          map_one' :=
                            (_ :
                              Quotient.liftOn ⟦unit⟧ (mapAux f)
                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                                1) }
                        y) })
        ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))
      ⟦x⟧ =
    F ⟦x⟧
hm : ⟦PreEnvelGroup.inv x⟧ = (⟦x⟧)⁻¹
⊢ ((fun f =>
          {
            toOneHom :=
              {
                toFun := fun x =>
                  Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                map_one' :=
                  (_ :
                    Quotient.liftOn ⟦unit⟧ (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                      1) },
            map_mul' :=
              (_ :
                ∀ (x y : EnvelGroup R),
                  OneHom.toFun
                      {
                        toFun := fun x =>
                          Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                        map_one' :=
                          (_ :
                            Quotient.liftOn ⟦unit⟧ (mapAux f)
                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                              1) }
                      (x * y) =
                    OneHom.toFun
                        {
                          toFun := fun x =>
                            Quotient.liftOn x (mapAux f)
                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                          map_one' :=
                            (_ :
                              Quotient.liftOn ⟦unit⟧ (mapAux f)
                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                                1) }
                        x *
                      OneHom.toFun
                        {
                          toFun := fun x =>
                            Quotient.liftOn x (mapAux f)
                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),
                          map_one' :=
                            (_ :
                              Quotient.liftOn ⟦unit⟧ (mapAux f)
                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =
                                1) }
                        y) })
        ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))
      ⟦PreEnvelGroup.inv x⟧ =
    F ⟦PreEnvelGroup.inv x⟧

Next tactic:
rw [hm, F.map_inv, MonoidHom.map_inv, ih_x]