/-- 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
          

Proof state:
case mul
R : Type u_1
inst✝¹ : Rack R
G : Type u_2
inst✝ : Group G
F : EnvelGroup R →* G
x✝ : EnvelGroup R
x y : 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⟧
ih_y :
  ((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))
      ⟦y⟧ =
    F ⟦y⟧
hm : ⟦PreEnvelGroup.mul x y⟧ = Mul.mul ⟦x⟧ ⟦y⟧
⊢ ((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.mul x y⟧ =
    F ⟦PreEnvelGroup.mul x y⟧

Next tactic:
simp only [MonoidHom.coe_mk, OneHom.coe_mk, Quotient.lift_mk]