/-- For any `s : S`, there is an `R`-linear map given by `a/b ↦ a/(b*s)`.
-/
@[simps]
def divBy (s : S) : LocalizedModule S M →ₗ[R] LocalizedModule S M where
  toFun p :=
    p.liftOn (fun p => mk p.1 (s * p.2)) fun ⟨a, b⟩ ⟨a', b'⟩ ⟨c, eq1⟩ =>
      mk_eq.mpr ⟨c, by rw [mul_smul, mul_smul, smul_comm c, eq1, smul_comm s]⟩
  map_add' x y :=
    x.induction_on₂
      (by
        intro m₁ m₂ t₁ t₂
        simp only [mk_add_mk, LocalizedModule.liftOn_mk, mul_smul, ← smul_add, mul_assoc,
          mk_cancel_common_left s]
        rw [show s * (t₁ * t₂) = t₁ * (s * t₂) by
            ext
            simp only [Submonoid.coe_mul]
            ring])
      y
  map_smul' r x :=
    x.inductionOn <| by
      

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : ↥S
r : R
x : LocalizedModule S M
⊢ ∀ (a : M × ↥S),
    AddHom.toFun
        {
          toFun := fun p =>
            liftOn p (fun p => mk p.1 (s * p.2))
              (_ : ∀ (x x_1 : M × ↥S), x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1),
          map_add' :=
            (_ :
              ∀ (x y : LocalizedModule S M),
                (fun p =>
                      liftOn p (fun p => mk p.1 (s * p.2))
                        (_ :
                          ∀ (x x_1 : M × ↥S),
                            x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1))
                    (x + y) =
                  (fun p =>
                        liftOn p (fun p => mk p.1 (s * p.2))
                          (_ :
                            ∀ (x x_1 : M × ↥S),
                              x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1))
                      x +
                    (fun p =>
                        liftOn p (fun p => mk p.1 (s * p.2))
                          (_ :
                            ∀ (x x_1 : M × ↥S),
                              x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1))
                      y) }
        (r • ⟦a⟧) =
      (RingHom.id R) r •
        AddHom.toFun
          {
            toFun := fun p =>
              liftOn p (fun p => mk p.1 (s * p.2))
                (_ : ∀ (x x_1 : M × ↥S), x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1),
            map_add' :=
              (_ :
                ∀ (x y : LocalizedModule S M),
                  (fun p =>
                        liftOn p (fun p => mk p.1 (s * p.2))
                          (_ :
                            ∀ (x x_1 : M × ↥S),
                              x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1))
                      (x + y) =
                    (fun p =>
                          liftOn p (fun p => mk p.1 (s * p.2))
                            (_ :
                              ∀ (x x_1 : M × ↥S),
                                x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1))
                        x +
                      (fun p =>
                          liftOn p (fun p => mk p.1 (s * p.2))
                            (_ :
                              ∀ (x x_1 : M × ↥S),
                                x ≈ x_1 → (fun p => mk p.1 (s * p.2)) x = (fun p => mk p.1 (s * p.2)) x_1))
                        y) }
          ⟦a⟧

Next tactic:
intro