R : Type u₁
inst✝⁶ : Semiring R
S : Type u₂
inst✝⁵ : CommSemiring S
A : Type u₃
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
T : Type u₄
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
f : A →ₐ[S] B
s : A → A → Prop
w : ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y
x : A
⊢ ↑(↑{
              toFun := fun f' =>
                {
                  toRingHom :=
                    {
                      toMonoidHom :=
                        {
                          toOneHom :=
                            {
                              toFun := fun x =>
                                Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                              map_one' :=
                                (_ :
                                  Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                      1.toQuot =
                                    1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => s x y),
                                OneHom.toFun
                                    {
                                      toFun := fun x =>
                                        Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                          x.toQuot,
                                      map_one' :=
                                        (_ :
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                              1.toQuot =
                                            1) }
                                    (x * y) =
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                1.toQuot =
                                              1) }
                                      x *
                                    OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                1.toQuot =
                                              1) }
                                      y) },
                      map_zero' :=
                        (_ :
                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) 0.toQuot = 0),
                      map_add' :=
                        (_ :
                          ∀ (x y : RingQuot fun x y => s x y),
                            OneHom.toFun
                                (↑{
                                    toOneHom :=
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                1.toQuot =
                                              1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : RingQuot fun x y => s x y),
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        1.toQuot =
                                                      1) }
                                              (x * y) =
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                x *
                                              OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                y) })
                                (x + y) =
                              OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => s x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  x +
                                OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => s x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  y) },
                  commutes' :=
                    (_ :
                      ∀ (x : S),
                        Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                            (↑(algebraMap S (RingQuot fun x y => s x y)) x).toQuot =
                          ↑(algebraMap S B) x) },
              invFun := fun F =>
                {
                  val :=
                    AlgHom.comp F
                      {
                        toRingHom :=
                          {
                            toMonoidHom :=
                              {
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                            map_zero' :=
                              (_ :
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                            map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (a a_1 : A),
                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                    0 =
                                  0),
                            map_add' :=
                              (_ :
                                ∀ (x y : A),
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                      (x + y) =
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                        x +
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                        y) },
                        commutes' :=
                          (_ :
                            ∀ (r : S),
                              OneHom.toFun
                                  (↑↑{
                                        toMonoidHom :=
                                          {
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                        map_zero' :=
                                          (_ :
                                            OneHom.toFun
                                                (↑{
                                                    toOneHom :=
                                                      {
                                                        toFun := fun x =>
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                        map_one' :=
                                                          (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                    map_mul' :=
                                                      (_ :
                                                        ∀ (a a_1 : A),
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                0 =
                                              0),
                                        map_add' :=
                                          (_ :
                                            ∀ (x y : A),
                                              OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  (x + y) =
                                                OneHom.toFun
                                                    (↑{
                                                        toOneHom :=
                                                          {
                                                            toFun := fun x =>
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                            map_one' :=
                                                              (_ :
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                        map_mul' :=
                                                          (_ :
                                                            ∀ (a a_1 : A),
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                    x +
                                                  OneHom.toFun
                                                    (↑{
                                                        toOneHom :=
                                                          {
                                                            toFun := fun x =>
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                            map_one' :=
                                                              (_ :
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                        map_mul' :=
                                                          (_ :
                                                            ∀ (a a_1 : A),
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                    y) })
                                  (↑(algebraMap S A) r) =
                                ↑(algebraMap S (RingQuot fun x y => s x y)) r) },
                  property :=
                    (_ :
                      (fun f => ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y)
                        (AlgHom.comp F
                          {
                            toRingHom :=
                              {
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                        map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (a a_1 : A),
                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                        0 =
                                      0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : A),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                  map_one' :=
                                                    (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (a a_1 : A),
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                          (x + y) =
                                        OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            x +
                                          OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            y) },
                            commutes' :=
                              (_ :
                                ∀ (r : S),
                                  OneHom.toFun
                                      (↑↑{
                                            toMonoidHom :=
                                              {
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                            map_zero' :=
                                              (_ :
                                                OneHom.toFun
                                                    (↑{
                                                        toOneHom :=
                                                          {
                                                            toFun := fun x =>
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                            map_one' :=
                                                              (_ :
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                        map_mul' :=
                                                          (_ :
                                                            ∀ (a a_1 : A),
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                    0 =
                                                  0),
                                            map_add' :=
                                              (_ :
                                                ∀ (x y : A),
                                                  OneHom.toFun
                                                      (↑{
                                                          toOneHom :=
                                                            {
                                                              toFun := fun x =>
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                              map_one' :=
                                                                (_ :
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                          map_mul' :=
                                                            (_ :
                                                              ∀ (a a_1 : A),
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                      (x + y) =
                                                    OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        x +
                                                      OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        y) })
                                      (↑(algebraMap S A) r) =
                                    ↑(algebraMap S (RingQuot fun x y => s x y)) r) })) },
              left_inv :=
                (_ :
                  Function.LeftInverse
                    (fun F =>
                      {
                        val :=
                          AlgHom.comp F
                            {
                              toRingHom :=
                                {
                                  toMonoidHom :=
                                    {
                                      toOneHom :=
                                        { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                          map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (a a_1 : A),
                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                  map_zero' :=
                                    (_ :
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                  map_one' :=
                                                    (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (a a_1 : A),
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                          0 =
                                        0),
                                  map_add' :=
                                    (_ :
                                      ∀ (x y : A),
                                        OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            (x + y) =
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              x +
                                            OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              y) },
                              commutes' :=
                                (_ :
                                  ∀ (r : S),
                                    OneHom.toFun
                                        (↑↑{
                                              toMonoidHom :=
                                                {
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                              map_zero' :=
                                                (_ :
                                                  OneHom.toFun
                                                      (↑{
                                                          toOneHom :=
                                                            {
                                                              toFun := fun x =>
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                              map_one' :=
                                                                (_ :
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                          map_mul' :=
                                                            (_ :
                                                              ∀ (a a_1 : A),
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                      0 =
                                                    0),
                                              map_add' :=
                                                (_ :
                                                  ∀ (x y : A),
                                                    OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        (x + y) =
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          x +
                                                        OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          y) })
                                        (↑(algebraMap S A) r) =
                                      ↑(algebraMap S (RingQuot fun x y => s x y)) r) },
                        property :=
                          (_ :
                            (fun f => ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y)
                              (AlgHom.comp F
                                {
                                  toRingHom :=
                                    {
                                      toMonoidHom :=
                                        {
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                      map_zero' :=
                                        (_ :
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              0 =
                                            0),
                                      map_add' :=
                                        (_ :
                                          ∀ (x y : A),
                                            OneHom.toFun
                                                (↑{
                                                    toOneHom :=
                                                      {
                                                        toFun := fun x =>
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                        map_one' :=
                                                          (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                    map_mul' :=
                                                      (_ :
                                                        ∀ (a a_1 : A),
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                (x + y) =
                                              OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  x +
                                                OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  y) },
                                  commutes' :=
                                    (_ :
                                      ∀ (r : S),
                                        OneHom.toFun
                                            (↑↑{
                                                  toMonoidHom :=
                                                    {
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                                  map_zero' :=
                                                    (_ :
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          0 =
                                                        0),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (x y : A),
                                                        OneHom.toFun
                                                            (↑{
                                                                toOneHom :=
                                                                  {
                                                                    toFun := fun x =>
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                    map_one' :=
                                                                      (_ :
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                          1) },
                                                                map_mul' :=
                                                                  (_ :
                                                                    ∀ (a a_1 : A),
                                                                      {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                          {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                            (x + y) =
                                                          OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              x +
                                                            OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              y) })
                                            (↑(algebraMap S A) r) =
                                          ↑(algebraMap S (RingQuot fun x y => s x y)) r) })) })
                    fun f' =>
                    {
                      toRingHom :=
                        {
                          toMonoidHom :=
                            {
                              toOneHom :=
                                {
                                  toFun := fun x =>
                                    Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                      x.toQuot,
                                  map_one' :=
                                    (_ :
                                      Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                          1.toQuot =
                                        1) },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : RingQuot fun x y => s x y),
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) }
                                        (x * y) =
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          x *
                                        OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          y) },
                          map_zero' :=
                            (_ :
                              Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) 0.toQuot =
                                0),
                          map_add' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => s x y),
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot fun x y => s x y),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    (x + y) =
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      x +
                                    OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      y) },
                      commutes' :=
                        (_ :
                          ∀ (x : S),
                            Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                (↑(algebraMap S (RingQuot fun x y => s x y)) x).toQuot =
                              ↑(algebraMap S B) x) }),
              right_inv :=
                (_ :
                  Function.RightInverse
                    (fun F =>
                      {
                        val :=
                          AlgHom.comp F
                            {
                              toRingHom :=
                                {
                                  toMonoidHom :=
                                    {
                                      toOneHom :=
                                        { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                          map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (a a_1 : A),
                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                  map_zero' :=
                                    (_ :
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                  map_one' :=
                                                    (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (a a_1 : A),
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                          0 =
                                        0),
                                  map_add' :=
                                    (_ :
                                      ∀ (x y : A),
                                        OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            (x + y) =
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              x +
                                            OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              y) },
                              commutes' :=
                                (_ :
                                  ∀ (r : S),
                                    OneHom.toFun
                                        (↑↑{
                                              toMonoidHom :=
                                                {
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                              map_zero' :=
                                                (_ :
                                                  OneHom.toFun
                                                      (↑{
                                                          toOneHom :=
                                                            {
                                                              toFun := fun x =>
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                              map_one' :=
                                                                (_ :
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                          map_mul' :=
                                                            (_ :
                                                              ∀ (a a_1 : A),
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                      0 =
                                                    0),
                                              map_add' :=
                                                (_ :
                                                  ∀ (x y : A),
                                                    OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        (x + y) =
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          x +
                                                        OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          y) })
                                        (↑(algebraMap S A) r) =
                                      ↑(algebraMap S (RingQuot fun x y => s x y)) r) },
                        property :=
                          (_ :
                            (fun f => ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y)
                              (AlgHom.comp F
                                {
                                  toRingHom :=
                                    {
                                      toMonoidHom :=
                                        {
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                      map_zero' :=
                                        (_ :
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              0 =
                                            0),
                                      map_add' :=
                                        (_ :
                                          ∀ (x y : A),
                                            OneHom.toFun
                                                (↑{
                                                    toOneHom :=
                                                      {
                                                        toFun := fun x =>
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                        map_one' :=
                                                          (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                    map_mul' :=
                                                      (_ :
                                                        ∀ (a a_1 : A),
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                (x + y) =
                                              OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  x +
                                                OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  y) },
                                  commutes' :=
                                    (_ :
                                      ∀ (r : S),
                                        OneHom.toFun
                                            (↑↑{
                                                  toMonoidHom :=
                                                    {
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                                  map_zero' :=
                                                    (_ :
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          0 =
                                                        0),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (x y : A),
                                                        OneHom.toFun
                                                            (↑{
                                                                toOneHom :=
                                                                  {
                                                                    toFun := fun x =>
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                    map_one' :=
                                                                      (_ :
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                          1) },
                                                                map_mul' :=
                                                                  (_ :
                                                                    ∀ (a a_1 : A),
                                                                      {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                          {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                            (x + y) =
                                                          OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              x +
                                                            OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              y) })
                                            (↑(algebraMap S A) r) =
                                          ↑(algebraMap S (RingQuot fun x y => s x y)) r) })) })
                    fun f' =>
                    {
                      toRingHom :=
                        {
                          toMonoidHom :=
                            {
                              toOneHom :=
                                {
                                  toFun := fun x =>
                                    Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                      x.toQuot,
                                  map_one' :=
                                    (_ :
                                      Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                          1.toQuot =
                                        1) },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : RingQuot fun x y => s x y),
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) }
                                        (x * y) =
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          x *
                                        OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          y) },
                          map_zero' :=
                            (_ :
                              Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) 0.toQuot =
                                0),
                          map_add' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => s x y),
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot fun x y => s x y),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    (x + y) =
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      x +
                                    OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      y) },
                      commutes' :=
                        (_ :
                          ∀ (x : S),
                            Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                (↑(algebraMap S (RingQuot fun x y => s x y)) x).toQuot =
                              ↑(algebraMap S B) x) }) }
          { val := f, property := w })
      (↑{
            toRingHom :=
              {
                toMonoidHom :=
                  {
                    toOneHom :=
                      { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                        map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                    map_mul' :=
                      (_ :
                        ∀ (a a_1 : A),
                          { toQuot := Quot.mk (Rel s) (a * a_1) } =
                            { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) },
                map_zero' :=
                  (_ :
                    OneHom.toFun
                        (↑{
                            toOneHom :=
                              { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (a a_1 : A),
                                  { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                    { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                        0 =
                      0),
                map_add' :=
                  (_ :
                    ∀ (x y : A),
                      OneHom.toFun
                          (↑{
                              toOneHom :=
                                { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                  map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                              map_mul' :=
                                (_ :
                                  ∀ (a a_1 : A),
                                    { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                      { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                          (x + y) =
                        OneHom.toFun
                            (↑{
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                            x +
                          OneHom.toFun
                            (↑{
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                            y) },
            commutes' :=
              (_ :
                ∀ (r : S),
                  OneHom.toFun
                      (↑↑{
                            toMonoidHom :=
                              {
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) },
                            map_zero' :=
                              (_ :
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                            map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (a a_1 : A),
                                              { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                                    0 =
                                  0),
                            map_add' :=
                              (_ :
                                ∀ (x y : A),
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel s) a } *
                                                    { toQuot := Quot.mk (Rel s) a_1 }) })
                                      (x + y) =
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel s) a } *
                                                      { toQuot := Quot.mk (Rel s) a_1 }) })
                                        x +
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel s) a } *
                                                      { toQuot := Quot.mk (Rel s) a_1 }) })
                                        y) })
                      (↑(algebraMap S A) r) =
                    ↑(algebraMap S (RingQuot s)) r) }
        x) =
    ↑f x
R : Type u₁
inst✝⁶ : Semiring R
S : Type u₂
inst✝⁵ : CommSemiring S
A : Type u₃
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
T : Type u₄
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
f : A →ₐ[S] B
s : A → A → Prop
w : ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y
x : A
⊢ ↑(↑(liftAlgHom S) { val := f, property := w }) (↑(mkAlgHom S s) x) = ↑f x
simp_rw [liftAlgHom_def, preLiftAlgHom_def, mkAlgHom_def, mkRingHom_def]
no goals
R : Type u₁
inst✝⁶ : Semiring R
S : Type u₂
inst✝⁵ : CommSemiring S
A : Type u₃
inst✝⁴ : Semiring A
inst✝³ : Algebra S A
r : R → R → Prop
T : Type u₄
inst✝² : Semiring T
B : Type u₄
inst✝¹ : Semiring B
inst✝ : Algebra S B
f : A →ₐ[S] B
s : A → A → Prop
w : ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y
x : A
⊢ ↑(↑{
              toFun := fun f' =>
                {
                  toRingHom :=
                    {
                      toMonoidHom :=
                        {
                          toOneHom :=
                            {
                              toFun := fun x =>
                                Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                              map_one' :=
                                (_ :
                                  Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                      1.toQuot =
                                    1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => s x y),
                                OneHom.toFun
                                    {
                                      toFun := fun x =>
                                        Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                          x.toQuot,
                                      map_one' :=
                                        (_ :
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                              1.toQuot =
                                            1) }
                                    (x * y) =
                                  OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                1.toQuot =
                                              1) }
                                      x *
                                    OneHom.toFun
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                1.toQuot =
                                              1) }
                                      y) },
                      map_zero' :=
                        (_ :
                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) 0.toQuot = 0),
                      map_add' :=
                        (_ :
                          ∀ (x y : RingQuot fun x y => s x y),
                            OneHom.toFun
                                (↑{
                                    toOneHom :=
                                      {
                                        toFun := fun x =>
                                          Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                            x.toQuot,
                                        map_one' :=
                                          (_ :
                                            Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                1.toQuot =
                                              1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : RingQuot fun x y => s x y),
                                          OneHom.toFun
                                              {
                                                toFun := fun x =>
                                                  Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    x.toQuot,
                                                map_one' :=
                                                  (_ :
                                                    Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        1.toQuot =
                                                      1) }
                                              (x * y) =
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                x *
                                              OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                y) })
                                (x + y) =
                              OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => s x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  x +
                                OneHom.toFun
                                  (↑{
                                      toOneHom :=
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : RingQuot fun x y => s x y),
                                            OneHom.toFun
                                                {
                                                  toFun := fun x =>
                                                    Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      x.toQuot,
                                                  map_one' :=
                                                    (_ :
                                                      Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          1.toQuot =
                                                        1) }
                                                (x * y) =
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  x *
                                                OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  y) })
                                  y) },
                  commutes' :=
                    (_ :
                      ∀ (x : S),
                        Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                            (↑(algebraMap S (RingQuot fun x y => s x y)) x).toQuot =
                          ↑(algebraMap S B) x) },
              invFun := fun F =>
                {
                  val :=
                    AlgHom.comp F
                      {
                        toRingHom :=
                          {
                            toMonoidHom :=
                              {
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                            map_zero' :=
                              (_ :
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                            map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (a a_1 : A),
                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                    0 =
                                  0),
                            map_add' :=
                              (_ :
                                ∀ (x y : A),
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                      (x + y) =
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                        x +
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                        y) },
                        commutes' :=
                          (_ :
                            ∀ (r : S),
                              OneHom.toFun
                                  (↑↑{
                                        toMonoidHom :=
                                          {
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                        map_zero' :=
                                          (_ :
                                            OneHom.toFun
                                                (↑{
                                                    toOneHom :=
                                                      {
                                                        toFun := fun x =>
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                        map_one' :=
                                                          (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                    map_mul' :=
                                                      (_ :
                                                        ∀ (a a_1 : A),
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                0 =
                                              0),
                                        map_add' :=
                                          (_ :
                                            ∀ (x y : A),
                                              OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  (x + y) =
                                                OneHom.toFun
                                                    (↑{
                                                        toOneHom :=
                                                          {
                                                            toFun := fun x =>
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                            map_one' :=
                                                              (_ :
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                        map_mul' :=
                                                          (_ :
                                                            ∀ (a a_1 : A),
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                    x +
                                                  OneHom.toFun
                                                    (↑{
                                                        toOneHom :=
                                                          {
                                                            toFun := fun x =>
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                            map_one' :=
                                                              (_ :
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                        map_mul' :=
                                                          (_ :
                                                            ∀ (a a_1 : A),
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                    y) })
                                  (↑(algebraMap S A) r) =
                                ↑(algebraMap S (RingQuot fun x y => s x y)) r) },
                  property :=
                    (_ :
                      (fun f => ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y)
                        (AlgHom.comp F
                          {
                            toRingHom :=
                              {
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                        map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (a a_1 : A),
                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                        0 =
                                      0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : A),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                  map_one' :=
                                                    (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (a a_1 : A),
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                          (x + y) =
                                        OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            x +
                                          OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            y) },
                            commutes' :=
                              (_ :
                                ∀ (r : S),
                                  OneHom.toFun
                                      (↑↑{
                                            toMonoidHom :=
                                              {
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                            map_zero' :=
                                              (_ :
                                                OneHom.toFun
                                                    (↑{
                                                        toOneHom :=
                                                          {
                                                            toFun := fun x =>
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                            map_one' :=
                                                              (_ :
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                        map_mul' :=
                                                          (_ :
                                                            ∀ (a a_1 : A),
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                    0 =
                                                  0),
                                            map_add' :=
                                              (_ :
                                                ∀ (x y : A),
                                                  OneHom.toFun
                                                      (↑{
                                                          toOneHom :=
                                                            {
                                                              toFun := fun x =>
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                              map_one' :=
                                                                (_ :
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                          map_mul' :=
                                                            (_ :
                                                              ∀ (a a_1 : A),
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                      (x + y) =
                                                    OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        x +
                                                      OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        y) })
                                      (↑(algebraMap S A) r) =
                                    ↑(algebraMap S (RingQuot fun x y => s x y)) r) })) },
              left_inv :=
                (_ :
                  Function.LeftInverse
                    (fun F =>
                      {
                        val :=
                          AlgHom.comp F
                            {
                              toRingHom :=
                                {
                                  toMonoidHom :=
                                    {
                                      toOneHom :=
                                        { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                          map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (a a_1 : A),
                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                  map_zero' :=
                                    (_ :
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                  map_one' :=
                                                    (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (a a_1 : A),
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                          0 =
                                        0),
                                  map_add' :=
                                    (_ :
                                      ∀ (x y : A),
                                        OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            (x + y) =
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              x +
                                            OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              y) },
                              commutes' :=
                                (_ :
                                  ∀ (r : S),
                                    OneHom.toFun
                                        (↑↑{
                                              toMonoidHom :=
                                                {
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                              map_zero' :=
                                                (_ :
                                                  OneHom.toFun
                                                      (↑{
                                                          toOneHom :=
                                                            {
                                                              toFun := fun x =>
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                              map_one' :=
                                                                (_ :
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                          map_mul' :=
                                                            (_ :
                                                              ∀ (a a_1 : A),
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                      0 =
                                                    0),
                                              map_add' :=
                                                (_ :
                                                  ∀ (x y : A),
                                                    OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        (x + y) =
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          x +
                                                        OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          y) })
                                        (↑(algebraMap S A) r) =
                                      ↑(algebraMap S (RingQuot fun x y => s x y)) r) },
                        property :=
                          (_ :
                            (fun f => ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y)
                              (AlgHom.comp F
                                {
                                  toRingHom :=
                                    {
                                      toMonoidHom :=
                                        {
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                      map_zero' :=
                                        (_ :
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              0 =
                                            0),
                                      map_add' :=
                                        (_ :
                                          ∀ (x y : A),
                                            OneHom.toFun
                                                (↑{
                                                    toOneHom :=
                                                      {
                                                        toFun := fun x =>
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                        map_one' :=
                                                          (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                    map_mul' :=
                                                      (_ :
                                                        ∀ (a a_1 : A),
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                (x + y) =
                                              OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  x +
                                                OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  y) },
                                  commutes' :=
                                    (_ :
                                      ∀ (r : S),
                                        OneHom.toFun
                                            (↑↑{
                                                  toMonoidHom :=
                                                    {
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                                  map_zero' :=
                                                    (_ :
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          0 =
                                                        0),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (x y : A),
                                                        OneHom.toFun
                                                            (↑{
                                                                toOneHom :=
                                                                  {
                                                                    toFun := fun x =>
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                    map_one' :=
                                                                      (_ :
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                          1) },
                                                                map_mul' :=
                                                                  (_ :
                                                                    ∀ (a a_1 : A),
                                                                      {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                          {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                            (x + y) =
                                                          OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              x +
                                                            OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              y) })
                                            (↑(algebraMap S A) r) =
                                          ↑(algebraMap S (RingQuot fun x y => s x y)) r) })) })
                    fun f' =>
                    {
                      toRingHom :=
                        {
                          toMonoidHom :=
                            {
                              toOneHom :=
                                {
                                  toFun := fun x =>
                                    Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                      x.toQuot,
                                  map_one' :=
                                    (_ :
                                      Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                          1.toQuot =
                                        1) },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : RingQuot fun x y => s x y),
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) }
                                        (x * y) =
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          x *
                                        OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          y) },
                          map_zero' :=
                            (_ :
                              Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) 0.toQuot =
                                0),
                          map_add' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => s x y),
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot fun x y => s x y),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    (x + y) =
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      x +
                                    OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      y) },
                      commutes' :=
                        (_ :
                          ∀ (x : S),
                            Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                (↑(algebraMap S (RingQuot fun x y => s x y)) x).toQuot =
                              ↑(algebraMap S B) x) }),
              right_inv :=
                (_ :
                  Function.RightInverse
                    (fun F =>
                      {
                        val :=
                          AlgHom.comp F
                            {
                              toRingHom :=
                                {
                                  toMonoidHom :=
                                    {
                                      toOneHom :=
                                        { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                          map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                      map_mul' :=
                                        (_ :
                                          ∀ (a a_1 : A),
                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                  map_zero' :=
                                    (_ :
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                  map_one' :=
                                                    (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (a a_1 : A),
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                          0 =
                                        0),
                                  map_add' :=
                                    (_ :
                                      ∀ (x y : A),
                                        OneHom.toFun
                                            (↑{
                                                toOneHom :=
                                                  { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                    map_one' :=
                                                      (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (a a_1 : A),
                                                      { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                            (x + y) =
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              x +
                                            OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              y) },
                              commutes' :=
                                (_ :
                                  ∀ (r : S),
                                    OneHom.toFun
                                        (↑↑{
                                              toMonoidHom :=
                                                {
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                              map_zero' :=
                                                (_ :
                                                  OneHom.toFun
                                                      (↑{
                                                          toOneHom :=
                                                            {
                                                              toFun := fun x =>
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                              map_one' :=
                                                                (_ :
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                          map_mul' :=
                                                            (_ :
                                                              ∀ (a a_1 : A),
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                      0 =
                                                    0),
                                              map_add' :=
                                                (_ :
                                                  ∀ (x y : A),
                                                    OneHom.toFun
                                                        (↑{
                                                            toOneHom :=
                                                              {
                                                                toFun := fun x =>
                                                                  { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                map_one' :=
                                                                  (_ :
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                      1) },
                                                            map_mul' :=
                                                              (_ :
                                                                ∀ (a a_1 : A),
                                                                  {
                                                                      toQuot :=
                                                                        Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                      {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                        (x + y) =
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          x +
                                                        OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          y) })
                                        (↑(algebraMap S A) r) =
                                      ↑(algebraMap S (RingQuot fun x y => s x y)) r) },
                        property :=
                          (_ :
                            (fun f => ∀ ⦃x y : A⦄, s x y → ↑f x = ↑f y)
                              (AlgHom.comp F
                                {
                                  toRingHom :=
                                    {
                                      toMonoidHom :=
                                        {
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                    { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                      map_zero' :=
                                        (_ :
                                          OneHom.toFun
                                              (↑{
                                                  toOneHom :=
                                                    { toFun := fun x => { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                      map_one' :=
                                                        (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                  map_mul' :=
                                                    (_ :
                                                      ∀ (a a_1 : A),
                                                        { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                              0 =
                                            0),
                                      map_add' :=
                                        (_ :
                                          ∀ (x y : A),
                                            OneHom.toFun
                                                (↑{
                                                    toOneHom :=
                                                      {
                                                        toFun := fun x =>
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                        map_one' :=
                                                          (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                    map_mul' :=
                                                      (_ :
                                                        ∀ (a a_1 : A),
                                                          { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                (x + y) =
                                              OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  x +
                                                OneHom.toFun
                                                  (↑{
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                  y) },
                                  commutes' :=
                                    (_ :
                                      ∀ (r : S),
                                        OneHom.toFun
                                            (↑↑{
                                                  toMonoidHom :=
                                                    {
                                                      toOneHom :=
                                                        {
                                                          toFun := fun x =>
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                          map_one' :=
                                                            (_ : { toQuot := Quot.mk (Rel fun x y => s x y) 1 } = 1) },
                                                      map_mul' :=
                                                        (_ :
                                                          ∀ (a a_1 : A),
                                                            { toQuot := Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                              { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                { toQuot := Quot.mk (Rel fun x y => s x y) a_1 }) },
                                                  map_zero' :=
                                                    (_ :
                                                      OneHom.toFun
                                                          (↑{
                                                              toOneHom :=
                                                                {
                                                                  toFun := fun x =>
                                                                    { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                  map_one' :=
                                                                    (_ :
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                        1) },
                                                              map_mul' :=
                                                                (_ :
                                                                  ∀ (a a_1 : A),
                                                                    {
                                                                        toQuot :=
                                                                          Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                        {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                          0 =
                                                        0),
                                                  map_add' :=
                                                    (_ :
                                                      ∀ (x y : A),
                                                        OneHom.toFun
                                                            (↑{
                                                                toOneHom :=
                                                                  {
                                                                    toFun := fun x =>
                                                                      { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                    map_one' :=
                                                                      (_ :
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) 1 } =
                                                                          1) },
                                                                map_mul' :=
                                                                  (_ :
                                                                    ∀ (a a_1 : A),
                                                                      {
                                                                          toQuot :=
                                                                            Quot.mk (Rel fun x y => s x y) (a * a_1) } =
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) a } *
                                                                          {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                            (x + y) =
                                                          OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              x +
                                                            OneHom.toFun
                                                              (↑{
                                                                  toOneHom :=
                                                                    {
                                                                      toFun := fun x =>
                                                                        { toQuot := Quot.mk (Rel fun x y => s x y) x },
                                                                      map_one' :=
                                                                        (_ :
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) 1 } =
                                                                            1) },
                                                                  map_mul' :=
                                                                    (_ :
                                                                      ∀ (a a_1 : A),
                                                                        {
                                                                            toQuot :=
                                                                              Quot.mk (Rel fun x y => s x y)
                                                                                (a * a_1) } =
                                                                          {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a } *
                                                                            {
                                                                              toQuot :=
                                                                                Quot.mk (Rel fun x y => s x y) a_1 }) })
                                                              y) })
                                            (↑(algebraMap S A) r) =
                                          ↑(algebraMap S (RingQuot fun x y => s x y)) r) })) })
                    fun f' =>
                    {
                      toRingHom :=
                        {
                          toMonoidHom :=
                            {
                              toOneHom :=
                                {
                                  toFun := fun x =>
                                    Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                      x.toQuot,
                                  map_one' :=
                                    (_ :
                                      Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                          1.toQuot =
                                        1) },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : RingQuot fun x y => s x y),
                                    OneHom.toFun
                                        {
                                          toFun := fun x =>
                                            Quot.lift ↑↑f'
                                              (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) x.toQuot,
                                          map_one' :=
                                            (_ :
                                              Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  1.toQuot =
                                                1) }
                                        (x * y) =
                                      OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          x *
                                        OneHom.toFun
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) }
                                          y) },
                          map_zero' :=
                            (_ :
                              Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b) 0.toQuot =
                                0),
                          map_add' :=
                            (_ :
                              ∀ (x y : RingQuot fun x y => s x y),
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          {
                                            toFun := fun x =>
                                              Quot.lift ↑↑f'
                                                (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                x.toQuot,
                                            map_one' :=
                                              (_ :
                                                Quot.lift ↑↑f'
                                                    (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                    1.toQuot =
                                                  1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (x y : RingQuot fun x y => s x y),
                                              OneHom.toFun
                                                  {
                                                    toFun := fun x =>
                                                      Quot.lift ↑↑f'
                                                        (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                        x.toQuot,
                                                    map_one' :=
                                                      (_ :
                                                        Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            1.toQuot =
                                                          1) }
                                                  (x * y) =
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    x *
                                                  OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    y) })
                                    (x + y) =
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      x +
                                    OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            {
                                              toFun := fun x =>
                                                Quot.lift ↑↑f'
                                                  (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                  x.toQuot,
                                              map_one' :=
                                                (_ :
                                                  Quot.lift ↑↑f'
                                                      (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                      1.toQuot =
                                                    1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (x y : RingQuot fun x y => s x y),
                                                OneHom.toFun
                                                    {
                                                      toFun := fun x =>
                                                        Quot.lift ↑↑f'
                                                          (_ :
                                                            ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                          x.toQuot,
                                                      map_one' :=
                                                        (_ :
                                                          Quot.lift ↑↑f'
                                                              (_ :
                                                                ∀ (a b : A),
                                                                  Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                              1.toQuot =
                                                            1) }
                                                    (x * y) =
                                                  OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      x *
                                                    OneHom.toFun
                                                      {
                                                        toFun := fun x =>
                                                          Quot.lift ↑↑f'
                                                            (_ :
                                                              ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                            x.toQuot,
                                                        map_one' :=
                                                          (_ :
                                                            Quot.lift ↑↑f'
                                                                (_ :
                                                                  ∀ (a b : A),
                                                                    Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                                                1.toQuot =
                                                              1) }
                                                      y) })
                                      y) },
                      commutes' :=
                        (_ :
                          ∀ (x : S),
                            Quot.lift ↑↑f' (_ : ∀ (a b : A), Rel (fun x y => s x y) a b → ↑↑f' a = ↑↑f' b)
                                (↑(algebraMap S (RingQuot fun x y => s x y)) x).toQuot =
                              ↑(algebraMap S B) x) }) }
          { val := f, property := w })
      (↑{
            toRingHom :=
              {
                toMonoidHom :=
                  {
                    toOneHom :=
                      { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                        map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                    map_mul' :=
                      (_ :
                        ∀ (a a_1 : A),
                          { toQuot := Quot.mk (Rel s) (a * a_1) } =
                            { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) },
                map_zero' :=
                  (_ :
                    OneHom.toFun
                        (↑{
                            toOneHom :=
                              { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                            map_mul' :=
                              (_ :
                                ∀ (a a_1 : A),
                                  { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                    { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                        0 =
                      0),
                map_add' :=
                  (_ :
                    ∀ (x y : A),
                      OneHom.toFun
                          (↑{
                              toOneHom :=
                                { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                  map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                              map_mul' :=
                                (_ :
                                  ∀ (a a_1 : A),
                                    { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                      { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                          (x + y) =
                        OneHom.toFun
                            (↑{
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                            x +
                          OneHom.toFun
                            (↑{
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                            y) },
            commutes' :=
              (_ :
                ∀ (r : S),
                  OneHom.toFun
                      (↑↑{
                            toMonoidHom :=
                              {
                                toOneHom :=
                                  { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                    map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (a a_1 : A),
                                      { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                        { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) },
                            map_zero' :=
                              (_ :
                                OneHom.toFun
                                    (↑{
                                        toOneHom :=
                                          { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                            map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                        map_mul' :=
                                          (_ :
                                            ∀ (a a_1 : A),
                                              { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                { toQuot := Quot.mk (Rel s) a } * { toQuot := Quot.mk (Rel s) a_1 }) })
                                    0 =
                                  0),
                            map_add' :=
                              (_ :
                                ∀ (x y : A),
                                  OneHom.toFun
                                      (↑{
                                          toOneHom :=
                                            { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                              map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                          map_mul' :=
                                            (_ :
                                              ∀ (a a_1 : A),
                                                { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                  { toQuot := Quot.mk (Rel s) a } *
                                                    { toQuot := Quot.mk (Rel s) a_1 }) })
                                      (x + y) =
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel s) a } *
                                                      { toQuot := Quot.mk (Rel s) a_1 }) })
                                        x +
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := fun x => { toQuot := Quot.mk (Rel s) x },
                                                map_one' := (_ : { toQuot := Quot.mk (Rel s) 1 } = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (a a_1 : A),
                                                  { toQuot := Quot.mk (Rel s) (a * a_1) } =
                                                    { toQuot := Quot.mk (Rel s) a } *
                                                      { toQuot := Quot.mk (Rel s) a_1 }) })
                                        y) })
                      (↑(algebraMap S A) r) =
                    ↑(algebraMap S (RingQuot s)) r) }
        x) =
    ↑f x
rfl