/-
Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Junyan Xu, Anne Baanen

! This file was ported from Lean 3 source module ring_theory.localization.module
! leanprover-community/mathlib commit 2e59a6de168f95d16b16d217b808a36290398c0a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.Basis
import Mathbin.RingTheory.Localization.FractionRing
import Mathbin.RingTheory.Localization.Integer

/-!
# Modules / vector spaces over localizations / fraction fields

This file contains some results about vector spaces over the field of fractions of a ring.

## Main results

 * `linear_independent.localization`: `b` is linear independent over a localization of `R`
   if it is linear independent over `R` itself
 * `basis.localization_localization`: promote an `R`-basis `b` of `A` to an `Rₛ`-basis of `Aₛ`,
   where `Rₛ` and `Aₛ` are localizations of `R` and `A` at `s` respectively
 * `linear_independent.iff_fraction_ring`: `b` is linear independent over `R` iff it is
   linear independent over `Frac(R)`
-/

open BigOperators

open nonZeroDivisors

section Localization

variable {R : Type _} (Rₛ : Type _) [CommRing R] [CommRing Rₛ] [Algebra R Rₛ]

variable (S : Submonoid R) [hT : IsLocalization S Rₛ]

include hT

section AddCommMonoid

variable {M : Type _} [AddCommMonoid M] [Module R M] [Module Rₛ M] [IsScalarTower R Rₛ M]

/- warning: linear_independent.localization -> LinearIndependent.localization is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u1} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [hT : IsLocalization.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {M : Type.{u3}} [_inst_4 : AddCommMonoid.{u3} M] [_inst_5 : Module.{u1, u3} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) _inst_4] [_inst_6 : Module.{u2, u3} Rₛ M (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_4] [_inst_7 : IsScalarTower.{u1, u2, u3} R Rₛ M (SMulZeroClass.toHasSmul.{u1, u2} R Rₛ (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R Rₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R Rₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (Module.toMulActionWithZero.{u1, u2} R Rₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Algebra.toModule.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3))))) (SMulZeroClass.toHasSmul.{u2, u3} Rₛ M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_4))) (SMulWithZero.toSmulZeroClass.{u2, u3} Rₛ M (MulZeroClass.toHasZero.{u2} Rₛ (MulZeroOneClass.toMulZeroClass.{u2} Rₛ (MonoidWithZero.toMulZeroOneClass.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_4))) (MulActionWithZero.toSMulWithZero.{u2, u3} Rₛ M (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_4))) (Module.toMulActionWithZero.{u2, u3} Rₛ M (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_4 _inst_6)))) (SMulZeroClass.toHasSmul.{u1, u3} R M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_4))) (SMulWithZero.toSmulZeroClass.{u1, u3} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_4))) (MulActionWithZero.toSMulWithZero.{u1, u3} R M (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_4))) (Module.toMulActionWithZero.{u1, u3} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) _inst_4 _inst_5))))] {ι : Type.{u4}} {b : ι -> M}, (LinearIndependent.{u4, u1, u3} ι R M b (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) _inst_4 _inst_5) -> (LinearIndependent.{u4, u2, u3} ι Rₛ M b (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_4 _inst_6)
but is expected to have type
  forall {R : Type.{u3}} (Rₛ : Type.{u1}) [_inst_1 : CommRing.{u3} R] [_inst_2 : CommRing.{u1} Rₛ] [_inst_3 : Algebra.{u3, u1} R Rₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2))] (S : Submonoid.{u3} R (MulZeroOneClass.toMulOneClass.{u3} R (NonAssocSemiring.toMulZeroOneClass.{u3} R (NonAssocRing.toNonAssocSemiring.{u3} R (Ring.toNonAssocRing.{u3} R (CommRing.toRing.{u3} R _inst_1)))))) [hT : IsLocalization.{u3, u1} R (CommRing.toCommSemiring.{u3} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) _inst_3] {M : Type.{u2}} [_inst_4 : AddCommMonoid.{u2} M] [_inst_5 : Module.{u3, u2} R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) _inst_4] [_inst_6 : Module.{u1, u2} Rₛ M (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) _inst_4] [_inst_7 : IsScalarTower.{u3, u1, u2} R Rₛ M (Algebra.toSMul.{u3, u1} R Rₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) _inst_3) (SMulZeroClass.toSMul.{u1, u2} Rₛ M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_4)) (SMulWithZero.toSMulZeroClass.{u1, u2} Rₛ M (CommMonoidWithZero.toZero.{u1} Rₛ (CommSemiring.toCommMonoidWithZero.{u1} Rₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2))) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_4)) (MulActionWithZero.toSMulWithZero.{u1, u2} Rₛ M (Semiring.toMonoidWithZero.{u1} Rₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2))) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_4)) (Module.toMulActionWithZero.{u1, u2} Rₛ M (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) _inst_4 _inst_6)))) (SMulZeroClass.toSMul.{u3, u2} R M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_4)) (SMulWithZero.toSMulZeroClass.{u3, u2} R M (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R (CommRing.toCommSemiring.{u3} R _inst_1))) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_4)) (MulActionWithZero.toSMulWithZero.{u3, u2} R M (Semiring.toMonoidWithZero.{u3} R (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1))) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_4)) (Module.toMulActionWithZero.{u3, u2} R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) _inst_4 _inst_5))))] {ι : Type.{u4}} {b : ι -> M}, (LinearIndependent.{u4, u3, u2} ι R M b (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) _inst_4 _inst_5) -> (LinearIndependent.{u4, u1, u2} ι Rₛ M b (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) _inst_4 _inst_6)
Case conversion may be inaccurate. Consider using '#align linear_independent.localization LinearIndependent.localizationₓ'. -/
theorem LinearIndependent.localization {ι : Type _} {b : ι → M} (hli : LinearIndependent R b) :
    LinearIndependent Rₛ b := by
  rw [linearIndependent_iff'] at hli⊢
  intro s g hg i hi
  choose! a g' hg' using IsLocalization.exist_integer_multiples S s g
  specialize hli s g' _ i hi
  · rw [← @smul_zero _ M _ _ (a : R), ← hg, Finset.smul_sum]
    refine' Finset.sum_congr rfl fun i hi => _
    rw [← IsScalarTower.algebraMap_smul Rₛ, hg' i hi, smul_assoc]
    infer_instance
  refine' (IsLocalization.map_units Rₛ a).mul_right_eq_zero.mp _
  rw [← Algebra.smul_def, ← map_zero (algebraMap R Rₛ), ← hli, hg' i hi]
#align linear_independent.localization LinearIndependent.localization

end AddCommMonoid

section LocalizationLocalization

variable {A : Type _} [CommRing A] [Algebra R A]

variable (Aₛ : Type _) [CommRing Aₛ] [Algebra A Aₛ]

variable [Algebra Rₛ Aₛ] [Algebra R Aₛ] [IsScalarTower R Rₛ Aₛ] [IsScalarTower R A Aₛ]

variable [hA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ]

include hA

open Submodule

/- warning: linear_independent.localization_localization -> LinearIndependent.localization_localization is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u1} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [hT : IsLocalization.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u4}) [_inst_6 : CommRing.{u4} Aₛ] [_inst_7 : Algebra.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_8 : Algebra.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_9 : Algebra.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u1, u2, u4} R Rₛ Aₛ (SMulZeroClass.toHasSmul.{u1, u2} R Rₛ (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R Rₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R Rₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (Module.toMulActionWithZero.{u1, u2} R Rₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Algebra.toModule.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3))))) (SMulZeroClass.toHasSmul.{u2, u4} Rₛ Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u2, u4} Rₛ Aₛ (MulZeroClass.toHasZero.{u2} Rₛ (MulZeroOneClass.toMulZeroClass.{u2} Rₛ (MonoidWithZero.toMulZeroOneClass.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u2, u4} Rₛ Aₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u2, u4} Rₛ Aₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [_inst_11 : IsScalarTower.{u1, u3, u4} R A Aₛ (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5))))) (SMulZeroClass.toHasSmul.{u3, u4} A Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u3, u4} A Aₛ (MulZeroClass.toHasZero.{u3} A (MulZeroOneClass.toMulZeroClass.{u3} A (MonoidWithZero.toMulZeroOneClass.{u3} A (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u3, u4} A Aₛ (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u3, u4} A Aₛ (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [hA : IsLocalization.{u3, u4} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u1, u3} R (CommRing.toCommSemiring.{u1} R _inst_1) A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u4} Aₛ _inst_6) _inst_7] {ι : Type.{u5}} {v : ι -> A}, (LinearIndependent.{u5, u1, u3} ι R A v (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) -> (LinearIndependent.{u5, u2, u4} ι Rₛ Aₛ (Function.comp.{succ u5, succ u3, succ u4} ι A Aₛ (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (fun (_x : RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) => A -> Aₛ) (RingHom.hasCoeToFun.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (algebraMap.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7)) v) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))
but is expected to have type
  forall {R : Type.{u4}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u4} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u4, u2} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u4} R (MulZeroOneClass.toMulOneClass.{u4} R (NonAssocSemiring.toMulZeroOneClass.{u4} R (NonAssocRing.toNonAssocSemiring.{u4} R (Ring.toNonAssocRing.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) [hT : IsLocalization.{u4, u2} R (CommRing.toCommSemiring.{u4} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u1}) [_inst_6 : CommRing.{u1} Aₛ] [_inst_7 : Algebra.{u3, u1} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))] [_inst_8 : Algebra.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))] [_inst_9 : Algebra.{u4, u1} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u4, u2, u1} R Rₛ Aₛ (Algebra.toSMul.{u4, u2} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3) (Algebra.toSMul.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Algebra.toSMul.{u4, u1} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_9)] [_inst_11 : IsScalarTower.{u4, u3, u1} R A Aₛ (Algebra.toSMul.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Algebra.toSMul.{u3, u1} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_7) (Algebra.toSMul.{u4, u1} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_9)] [hA : IsLocalization.{u3, u1} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u4, u3} R (CommRing.toCommSemiring.{u4} R _inst_1) A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u1} Aₛ _inst_6) _inst_7] {ι : Type.{u5}} {v : ι -> A}, (LinearIndependent.{u5, u4, u3} ι R A v (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) -> (LinearIndependent.{u5, u2, u1} ι Rₛ Aₛ (Function.comp.{succ u5, succ u3, succ u1} ι A Aₛ (FunLike.coe.{max (succ u3) (succ u1), succ u3, succ u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => Aₛ) _x) (MulHomClass.toFunLike.{max u3 u1, u3, u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A Aₛ (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))))) (NonUnitalNonAssocSemiring.toMul.{u1} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} Aₛ (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} Aₛ (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) (RingHomClass.toNonUnitalRingHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))) (RingHom.instRingHomClassRingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))))) (algebraMap.{u3, u1} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_7)) v) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8))
Case conversion may be inaccurate. Consider using '#align linear_independent.localization_localization LinearIndependent.localization_localizationₓ'. -/
theorem LinearIndependent.localization_localization {ι : Type _} {v : ι → A}
    (hv : LinearIndependent R v) : LinearIndependent Rₛ (algebraMap A Aₛ ∘ v) :=
  by
  rw [linearIndependent_iff'] at hv⊢
  intro s g hg i hi
  choose! a g' hg' using IsLocalization.exist_integer_multiples S s g
  have h0 : algebraMap A Aₛ (∑ i in s, g' i • v i) = 0 :=
    by
    apply_fun (· • ·) (a : R)  at hg
    rw [smul_zero, Finset.smul_sum] at hg
    rw [map_sum, ← hg]
    refine' Finset.sum_congr rfl fun i hi => _
    rw [← smul_assoc, ← hg' i hi, Algebra.smul_def, map_mul, ← IsScalarTower.algebraMap_apply, ←
      Algebra.smul_def, algebraMap_smul]
  obtain ⟨⟨_, r, hrS, rfl⟩, hr : algebraMap R A r * _ = 0⟩ :=
    (IsLocalization.map_eq_zero_iff (Algebra.algebraMapSubmonoid A S) _ _).1 h0
  simp_rw [Finset.mul_sum, ← Algebra.smul_def, smul_smul] at hr
  specialize hv s _ hr i hi
  rw [← (IsLocalization.map_units Rₛ a).mul_right_eq_zero, ← Algebra.smul_def, ← hg' i hi]
  exact (IsLocalization.map_eq_zero_iff S _ _).2 ⟨⟨r, hrS⟩, hv⟩
#align linear_independent.localization_localization LinearIndependent.localization_localization

/- warning: span_eq_top.localization_localization -> SpanEqTop.localization_localization is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u1} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [hT : IsLocalization.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u4}) [_inst_6 : CommRing.{u4} Aₛ] [_inst_7 : Algebra.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_8 : Algebra.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_9 : Algebra.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u1, u2, u4} R Rₛ Aₛ (SMulZeroClass.toHasSmul.{u1, u2} R Rₛ (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R Rₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R Rₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (Module.toMulActionWithZero.{u1, u2} R Rₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Algebra.toModule.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3))))) (SMulZeroClass.toHasSmul.{u2, u4} Rₛ Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u2, u4} Rₛ Aₛ (MulZeroClass.toHasZero.{u2} Rₛ (MulZeroOneClass.toMulZeroClass.{u2} Rₛ (MonoidWithZero.toMulZeroOneClass.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u2, u4} Rₛ Aₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u2, u4} Rₛ Aₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [_inst_11 : IsScalarTower.{u1, u3, u4} R A Aₛ (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5))))) (SMulZeroClass.toHasSmul.{u3, u4} A Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u3, u4} A Aₛ (MulZeroClass.toHasZero.{u3} A (MulZeroOneClass.toMulZeroClass.{u3} A (MonoidWithZero.toMulZeroOneClass.{u3} A (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u3, u4} A Aₛ (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u3, u4} A Aₛ (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [hA : IsLocalization.{u3, u4} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u1, u3} R (CommRing.toCommSemiring.{u1} R _inst_1) A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u4} Aₛ _inst_6) _inst_7] {v : Set.{u3} A}, (Eq.{succ u3} (Submodule.{u1, u3} R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (Submodule.span.{u1, u3} R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) v) (Top.top.{u3} (Submodule.{u1, u3} R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (Submodule.hasTop.{u1, u3} R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)))) -> (Eq.{succ u4} (Submodule.{u2, u4} Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8)) (Submodule.span.{u2, u4} Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8) (Set.image.{u3, u4} A Aₛ (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (fun (_x : RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) => A -> Aₛ) (RingHom.hasCoeToFun.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (algebraMap.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7)) v)) (Top.top.{u4} (Submodule.{u2, u4} Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8)) (Submodule.hasTop.{u2, u4} Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))))
but is expected to have type
  forall {R : Type.{u3}} (Rₛ : Type.{u1}) [_inst_1 : CommRing.{u3} R] [_inst_2 : CommRing.{u1} Rₛ] [_inst_3 : Algebra.{u3, u1} R Rₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2))] (S : Submonoid.{u3} R (MulZeroOneClass.toMulOneClass.{u3} R (NonAssocSemiring.toMulZeroOneClass.{u3} R (NonAssocRing.toNonAssocSemiring.{u3} R (Ring.toNonAssocRing.{u3} R (CommRing.toRing.{u3} R _inst_1)))))) [hT : IsLocalization.{u3, u1} R (CommRing.toCommSemiring.{u3} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) _inst_3] {A : Type.{u4}} [_inst_4 : CommRing.{u4} A] [_inst_5 : Algebra.{u3, u4} R A (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4))] (Aₛ : Type.{u2}) [_inst_6 : CommRing.{u2} Aₛ] [_inst_7 : Algebra.{u4, u2} A Aₛ (CommRing.toCommSemiring.{u4} A _inst_4) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))] [_inst_8 : Algebra.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))] [_inst_9 : Algebra.{u3, u2} R Aₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u3, u1, u2} R Rₛ Aₛ (Algebra.toSMul.{u3, u1} R Rₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) _inst_3) (Algebra.toSMul.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8) (Algebra.toSMul.{u3, u2} R Aₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_9)] [_inst_11 : IsScalarTower.{u3, u4, u2} R A Aₛ (Algebra.toSMul.{u3, u4} R A (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4)) _inst_5) (Algebra.toSMul.{u4, u2} A Aₛ (CommRing.toCommSemiring.{u4} A _inst_4) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_7) (Algebra.toSMul.{u3, u2} R Aₛ (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_9)] [hA : IsLocalization.{u4, u2} A (CommRing.toCommSemiring.{u4} A _inst_4) (Algebra.algebraMapSubmonoid.{u3, u4} R (CommRing.toCommSemiring.{u3} R _inst_1) A (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u2} Aₛ _inst_6) _inst_7] {v : Set.{u4} A}, (Eq.{succ u4} (Submodule.{u3, u4} R A (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u4} A (NonAssocRing.toNonUnitalNonAssocRing.{u4} A (Ring.toNonAssocRing.{u4} A (CommRing.toRing.{u4} A _inst_4))))) (Algebra.toModule.{u3, u4} R A (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4)) _inst_5)) (Submodule.span.{u3, u4} R A (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u4} A (NonAssocRing.toNonUnitalNonAssocRing.{u4} A (Ring.toNonAssocRing.{u4} A (CommRing.toRing.{u4} A _inst_4))))) (Algebra.toModule.{u3, u4} R A (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4)) _inst_5) v) (Top.top.{u4} (Submodule.{u3, u4} R A (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u4} A (NonAssocRing.toNonUnitalNonAssocRing.{u4} A (Ring.toNonAssocRing.{u4} A (CommRing.toRing.{u4} A _inst_4))))) (Algebra.toModule.{u3, u4} R A (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4)) _inst_5)) (Submodule.instTopSubmodule.{u3, u4} R A (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u4} A (NonAssocRing.toNonUnitalNonAssocRing.{u4} A (Ring.toNonAssocRing.{u4} A (CommRing.toRing.{u4} A _inst_4))))) (Algebra.toModule.{u3, u4} R A (CommRing.toCommSemiring.{u3} R _inst_1) (Ring.toSemiring.{u4} A (CommRing.toRing.{u4} A _inst_4)) _inst_5)))) -> (Eq.{succ u2} (Submodule.{u1, u2} Rₛ Aₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u2} Aₛ (Ring.toNonAssocRing.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (Algebra.toModule.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8)) (Submodule.span.{u1, u2} Rₛ Aₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u2} Aₛ (Ring.toNonAssocRing.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (Algebra.toModule.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8) (Set.image.{u4, u2} A Aₛ (FunLike.coe.{max (succ u4) (succ u2), succ u4, succ u2} (RingHom.{u4, u2} A Aₛ (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => Aₛ) _x) (MulHomClass.toFunLike.{max u4 u2, u4, u2} (RingHom.{u4, u2} A Aₛ (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A Aₛ (NonUnitalNonAssocSemiring.toMul.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))))) (NonUnitalNonAssocSemiring.toMul.{u2} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Aₛ (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (NonUnitalRingHomClass.toMulHomClass.{max u4 u2, u4, u2} (RingHom.{u4, u2} A Aₛ (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Aₛ (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) (RingHomClass.toNonUnitalRingHomClass.{max u4 u2, u4, u2} (RingHom.{u4, u2} A Aₛ (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A Aₛ (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))) (RingHom.instRingHomClassRingHom.{u4, u2} A Aₛ (Semiring.toNonAssocSemiring.{u4} A (CommSemiring.toSemiring.{u4} A (CommRing.toCommSemiring.{u4} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))))) (algebraMap.{u4, u2} A Aₛ (CommRing.toCommSemiring.{u4} A _inst_4) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_7)) v)) (Top.top.{u2} (Submodule.{u1, u2} Rₛ Aₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u2} Aₛ (Ring.toNonAssocRing.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (Algebra.toModule.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8)) (Submodule.instTopSubmodule.{u1, u2} Rₛ Aₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u2} Aₛ (Ring.toNonAssocRing.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (Algebra.toModule.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8))))
Case conversion may be inaccurate. Consider using '#align span_eq_top.localization_localization SpanEqTop.localization_localizationₓ'. -/
theorem SpanEqTop.localization_localization {v : Set A} (hv : span R v = ⊤) :
    span Rₛ (algebraMap A Aₛ '' v) = ⊤ := by
  rw [eq_top_iff]
  rintro a' -
  obtain ⟨a, ⟨_, s, hs, rfl⟩, rfl⟩ :=
    IsLocalization.mk'_surjective (Algebra.algebraMapSubmonoid A S) a'
  rw [IsLocalization.mk'_eq_mul_mk'_one, mul_comm, ← map_one (algebraMap R A)]
  erw [← IsLocalization.algebraMap_mk' A Rₛ Aₛ (1 : R) ⟨s, hs⟩]
  -- `erw` needed to unify `⟨s, hs⟩`
  rw [← Algebra.smul_def]
  refine' smul_mem _ _ (span_subset_span R _ _ _)
  rw [← Algebra.coe_linearMap, ← LinearMap.coe_restrictScalars R, ← LinearMap.map_span]
  exact mem_map_of_mem (hv.symm ▸ mem_top)
  · infer_instance
#align span_eq_top.localization_localization SpanEqTop.localization_localization

#print Basis.localizationLocalization /-
/-- If `A` has an `R`-basis, then localizing `A` at `S` has a basis over `R` localized at `S`.

A suitable instance for `[algebra A Aₛ]` is `localization_algebra`.
-/
noncomputable def Basis.localizationLocalization {ι : Type _} (b : Basis ι R A) : Basis ι Rₛ Aₛ :=
  Basis.mk (b.LinearIndependent.localization_localization _ S _)
    (by
      rw [Set.range_comp, SpanEqTop.localization_localization Rₛ S Aₛ b.span_eq]
      exact le_rfl)
#align basis.localization_localization Basis.localizationLocalization
-/

/- warning: basis.localization_localization_apply -> Basis.localizationLocalization_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u1} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [hT : IsLocalization.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u4}) [_inst_6 : CommRing.{u4} Aₛ] [_inst_7 : Algebra.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_8 : Algebra.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_9 : Algebra.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u1, u2, u4} R Rₛ Aₛ (SMulZeroClass.toHasSmul.{u1, u2} R Rₛ (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R Rₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R Rₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (Module.toMulActionWithZero.{u1, u2} R Rₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Algebra.toModule.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3))))) (SMulZeroClass.toHasSmul.{u2, u4} Rₛ Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u2, u4} Rₛ Aₛ (MulZeroClass.toHasZero.{u2} Rₛ (MulZeroOneClass.toMulZeroClass.{u2} Rₛ (MonoidWithZero.toMulZeroOneClass.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u2, u4} Rₛ Aₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u2, u4} Rₛ Aₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [_inst_11 : IsScalarTower.{u1, u3, u4} R A Aₛ (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5))))) (SMulZeroClass.toHasSmul.{u3, u4} A Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u3, u4} A Aₛ (MulZeroClass.toHasZero.{u3} A (MulZeroOneClass.toMulZeroClass.{u3} A (MonoidWithZero.toMulZeroOneClass.{u3} A (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u3, u4} A Aₛ (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u3, u4} A Aₛ (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [hA : IsLocalization.{u3, u4} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u1, u3} R (CommRing.toCommSemiring.{u1} R _inst_1) A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u4} Aₛ _inst_6) _inst_7] {ι : Type.{u5}} (b : Basis.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (i : ι), Eq.{succ u4} Aₛ (coeFn.{max (succ u5) (succ u2) (succ u4), max (succ u5) (succ u4)} (Basis.{u5, u2, u4} ι Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8)) (fun (_x : Basis.{u5, u2, u4} ι Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8)) => ι -> Aₛ) (FunLike.hasCoeToFun.{max (succ u5) (succ u2) (succ u4), succ u5, succ u4} (Basis.{u5, u2, u4} ι Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8)) ι (fun (_x : ι) => Aₛ) (Basis.funLike.{u5, u2, u4} ι Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))) (Basis.localizationLocalization.{u1, u2, u3, u4, u5} R Rₛ _inst_1 _inst_2 _inst_3 S hT A _inst_4 _inst_5 Aₛ _inst_6 _inst_7 _inst_8 _inst_9 _inst_10 _inst_11 hA ι b) i) (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (fun (_x : RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) => A -> Aₛ) (RingHom.hasCoeToFun.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (algebraMap.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7) (coeFn.{max (succ u5) (succ u1) (succ u3), max (succ u5) (succ u3)} (Basis.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (fun (_x : Basis.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) => ι -> A) (FunLike.hasCoeToFun.{max (succ u5) (succ u1) (succ u3), succ u5, succ u3} (Basis.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) ι (fun (_x : ι) => A) (Basis.funLike.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5))) b i))
but is expected to have type
  forall {R : Type.{u4}} (Rₛ : Type.{u1}) [_inst_1 : CommRing.{u4} R] [_inst_2 : CommRing.{u1} Rₛ] [_inst_3 : Algebra.{u4, u1} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2))] (S : Submonoid.{u4} R (MulZeroOneClass.toMulOneClass.{u4} R (NonAssocSemiring.toMulZeroOneClass.{u4} R (NonAssocRing.toNonAssocSemiring.{u4} R (Ring.toNonAssocRing.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) [hT : IsLocalization.{u4, u1} R (CommRing.toCommSemiring.{u4} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u2}) [_inst_6 : CommRing.{u2} Aₛ] [_inst_7 : Algebra.{u3, u2} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))] [_inst_8 : Algebra.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))] [_inst_9 : Algebra.{u4, u2} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u4, u1, u2} R Rₛ Aₛ (Algebra.toSMul.{u4, u1} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) _inst_3) (Algebra.toSMul.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8) (Algebra.toSMul.{u4, u2} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_9)] [_inst_11 : IsScalarTower.{u4, u3, u2} R A Aₛ (Algebra.toSMul.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Algebra.toSMul.{u3, u2} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_7) (Algebra.toSMul.{u4, u2} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_9)] [hA : IsLocalization.{u3, u2} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u4, u3} R (CommRing.toCommSemiring.{u4} R _inst_1) A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u2} Aₛ _inst_6) _inst_7] {ι : Type.{u5}} (b : Basis.{u5, u4, u3} ι R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (i : ι), Eq.{succ u2} ((fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => Aₛ) i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u5), succ u5, succ u2} (Basis.{u5, u1, u2} ι Rₛ Aₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u2} Aₛ (Ring.toNonAssocRing.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (Algebra.toModule.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8)) ι (fun (_x : ι) => (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => Aₛ) _x) (Basis.funLike.{u5, u1, u2} ι Rₛ Aₛ (Ring.toSemiring.{u1} Rₛ (CommRing.toRing.{u1} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u2} Aₛ (Ring.toNonAssocRing.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (Algebra.toModule.{u1, u2} Rₛ Aₛ (CommRing.toCommSemiring.{u1} Rₛ _inst_2) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_8)) (Basis.localizationLocalization.{u4, u1, u3, u2, u5} R Rₛ _inst_1 _inst_2 _inst_3 S hT A _inst_4 _inst_5 Aₛ _inst_6 _inst_7 _inst_8 _inst_9 _inst_10 _inst_11 hA ι b) i) (FunLike.coe.{max (succ u3) (succ u2), succ u3, succ u2} (RingHom.{u3, u2} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => Aₛ) _x) (MulHomClass.toFunLike.{max u3 u2, u3, u2} (RingHom.{u3, u2} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A Aₛ (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))))) (NonUnitalNonAssocSemiring.toMul.{u2} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Aₛ (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Aₛ (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) (RingHomClass.toNonUnitalRingHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)))) A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))) (RingHom.instRingHomClassRingHom.{u3, u2} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u2} Aₛ (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6))))))) (algebraMap.{u3, u2} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u2} Aₛ (CommRing.toRing.{u2} Aₛ _inst_6)) _inst_7) (FunLike.coe.{max (max (succ u4) (succ u3)) (succ u5), succ u5, succ u3} (Basis.{u5, u4, u3} ι R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) ι (fun (_x : ι) => (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => A) _x) (Basis.funLike.{u5, u4, u3} ι R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) b i))
Case conversion may be inaccurate. Consider using '#align basis.localization_localization_apply Basis.localizationLocalization_applyₓ'. -/
@[simp]
theorem Basis.localizationLocalization_apply {ι : Type _} (b : Basis ι R A) (i) :
    b.localization_localization Rₛ S Aₛ i = algebraMap A Aₛ (b i) :=
  Basis.mk_apply _ _ _
#align basis.localization_localization_apply Basis.localizationLocalization_apply

/- warning: basis.localization_localization_repr_algebra_map -> Basis.localizationLocalization_repr_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u1} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [hT : IsLocalization.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u4}) [_inst_6 : CommRing.{u4} Aₛ] [_inst_7 : Algebra.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_8 : Algebra.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_9 : Algebra.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u1, u2, u4} R Rₛ Aₛ (SMulZeroClass.toHasSmul.{u1, u2} R Rₛ (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R Rₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R Rₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u2} Rₛ (AddMonoid.toAddZeroClass.{u2} Rₛ (AddCommMonoid.toAddMonoid.{u2} Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (Module.toMulActionWithZero.{u1, u2} R Rₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Algebra.toModule.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3))))) (SMulZeroClass.toHasSmul.{u2, u4} Rₛ Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u2, u4} Rₛ Aₛ (MulZeroClass.toHasZero.{u2} Rₛ (MulZeroOneClass.toMulZeroClass.{u2} Rₛ (MonoidWithZero.toMulZeroOneClass.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u2, u4} Rₛ Aₛ (Semiring.toMonoidWithZero.{u2} Rₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u2, u4} Rₛ Aₛ (CommSemiring.toSemiring.{u2} Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [_inst_11 : IsScalarTower.{u1, u3, u4} R A Aₛ (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (SMulWithZero.toSmulZeroClass.{u1, u3} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)))))))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5))))) (SMulZeroClass.toHasSmul.{u3, u4} A Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u3, u4} A Aₛ (MulZeroClass.toHasZero.{u3} A (MulZeroOneClass.toMulZeroClass.{u3} A (MonoidWithZero.toMulZeroOneClass.{u3} A (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u3, u4} A Aₛ (Semiring.toMonoidWithZero.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u3, u4} A Aₛ (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7))))) (SMulZeroClass.toHasSmul.{u1, u4} R Aₛ (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (SMulWithZero.toSmulZeroClass.{u1, u4} R Aₛ (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (MulActionWithZero.toSMulWithZero.{u1, u4} R Aₛ (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u4} Aₛ (AddMonoid.toAddZeroClass.{u4} Aₛ (AddCommMonoid.toAddMonoid.{u4} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))))))) (Module.toMulActionWithZero.{u1, u4} R Aₛ (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} Aₛ (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u1, u4} R Aₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_9)))))] [hA : IsLocalization.{u3, u4} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u1, u3} R (CommRing.toCommSemiring.{u1} R _inst_1) A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u4} Aₛ _inst_6) _inst_7] {ι : Type.{u5}} (b : Basis.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (x : A) (i : ι), Eq.{succ u2} Rₛ (coeFn.{max (succ u5) (succ u2), max (succ u5) (succ u2)} (Finsupp.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (fun (_x : Finsupp.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) => ι -> Rₛ) (Finsupp.coeFun.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (coeFn.{max (succ u4) (succ (max u5 u2)), max (succ u4) (succ (max u5 u2))} (LinearEquiv.{u2, u2, u4, max u5 u2} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (fun (_x : LinearEquiv.{u2, u2, u4, max u5 u2} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) => Aₛ -> (Finsupp.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (LinearEquiv.hasCoeToFun.{u2, u2, u4, max u5 u2} Rₛ Rₛ Aₛ (Finsupp.{u5, u2} ι Rₛ (MulZeroClass.toHasZero.{u2} Rₛ (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (Basis.repr.{u5, u2, u4} ι Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (AddCommGroup.toAddCommMonoid.{u4} Aₛ (NonUnitalNonAssocRing.toAddCommGroup.{u4} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u4} Aₛ (Ring.toNonAssocRing.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6))))) (Algebra.toModule.{u2, u4} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_8) (Basis.localizationLocalization.{u1, u2, u3, u4, u5} R Rₛ _inst_1 _inst_2 _inst_3 S hT A _inst_4 _inst_5 Aₛ _inst_6 _inst_7 _inst_8 _inst_9 _inst_10 _inst_11 hA ι b)) (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (fun (_x : RingHom.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) => A -> Aₛ) (RingHom.hasCoeToFun.{u3, u4} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u4} Aₛ (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)))) (algebraMap.{u3, u4} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u4} Aₛ (CommRing.toRing.{u4} Aₛ _inst_6)) _inst_7) x)) i) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R Rₛ (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (fun (_x : RingHom.{u1, u2} R Rₛ (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) => R -> Rₛ) (RingHom.hasCoeToFun.{u1, u2} R Rₛ (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (algebraMap.{u1, u2} R Rₛ (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3) (coeFn.{max (succ u5) (succ u1), max (succ u5) (succ u1)} (Finsupp.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))))) (fun (_x : Finsupp.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))))) => ι -> R) (Finsupp.coeFun.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))))) (coeFn.{max (succ u3) (succ (max u5 u1)), max (succ u3) (succ (max u5 u1))} (LinearEquiv.{u1, u1, u3, max u5 u1} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHomInvPair.ids.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) A (Finsupp.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))))) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u1, u1} ι R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Semiring.toModule.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (fun (_x : LinearEquiv.{u1, u1, u3, max u5 u1} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHomInvPair.ids.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) A (Finsupp.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))))) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u1, u1} ι R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Semiring.toModule.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) => A -> (Finsupp.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))) (LinearEquiv.hasCoeToFun.{u1, u1, u3, max u5 u1} R R A (Finsupp.{u5, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))))) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u1, u1} ι R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Semiring.toModule.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (RingHomInvPair.ids.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Basis.repr.{u5, u1, u3} ι R A (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toAddCommGroup.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u1, u3} R A (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) b) x) i))
but is expected to have type
  forall {R : Type.{u4}} (Rₛ : Type.{u2}) [_inst_1 : CommRing.{u4} R] [_inst_2 : CommRing.{u2} Rₛ] [_inst_3 : Algebra.{u4, u2} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))] (S : Submonoid.{u4} R (MulZeroOneClass.toMulOneClass.{u4} R (NonAssocSemiring.toMulZeroOneClass.{u4} R (NonAssocRing.toNonAssocSemiring.{u4} R (Ring.toNonAssocRing.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) [hT : IsLocalization.{u4, u2} R (CommRing.toCommSemiring.{u4} R _inst_1) S Rₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) _inst_3] {A : Type.{u3}} [_inst_4 : CommRing.{u3} A] [_inst_5 : Algebra.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4))] (Aₛ : Type.{u1}) [_inst_6 : CommRing.{u1} Aₛ] [_inst_7 : Algebra.{u3, u1} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))] [_inst_8 : Algebra.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))] [_inst_9 : Algebra.{u4, u1} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))] [_inst_10 : IsScalarTower.{u4, u2, u1} R Rₛ Aₛ (Algebra.toSMul.{u4, u2} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3) (Algebra.toSMul.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Algebra.toSMul.{u4, u1} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_9)] [_inst_11 : IsScalarTower.{u4, u3, u1} R A Aₛ (Algebra.toSMul.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Algebra.toSMul.{u3, u1} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_7) (Algebra.toSMul.{u4, u1} R Aₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_9)] [hA : IsLocalization.{u3, u1} A (CommRing.toCommSemiring.{u3} A _inst_4) (Algebra.algebraMapSubmonoid.{u4, u3} R (CommRing.toCommSemiring.{u4} R _inst_1) A (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5 S) Aₛ (CommRing.toCommSemiring.{u1} Aₛ _inst_6) _inst_7] {ι : Type.{u5}} (b : Basis.{u5, u4, u3} ι R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (x : A) (i : ι), Eq.{succ u2} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Rₛ) i) (FunLike.coe.{max (succ u5) (succ u2), succ u5, succ u2} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => Rₛ) _x) (Finsupp.funLike.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (FunLike.coe.{max (max (succ u2) (succ u1)) (succ u5), succ u1, max (succ u2) (succ u5)} (LinearEquiv.{u2, u2, u1, max u2 u5} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) Aₛ (fun (_x : Aₛ) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Aₛ) => Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) _x) (SMulHomClass.toFunLike.{max (max u2 u1) u5, u2, u1, max u2 u5} (LinearEquiv.{u2, u2, u1, max u2 u5} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) Rₛ Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (SMulZeroClass.toSMul.{u2, u1} Rₛ Aₛ (AddMonoid.toZero.{u1} Aₛ (AddCommMonoid.toAddMonoid.{u1} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))))) (DistribSMul.toSMulZeroClass.{u2, u1} Rₛ Aₛ (AddMonoid.toAddZeroClass.{u1} Aₛ (AddCommMonoid.toAddMonoid.{u1} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))))) (DistribMulAction.toDistribSMul.{u2, u1} Rₛ Aₛ (MonoidWithZero.toMonoid.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (AddCommMonoid.toAddMonoid.{u1} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))))) (Module.toDistribMulAction.{u2, u1} Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8))))) (SMulZeroClass.toSMul.{u2, max u2 u5} Rₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (AddMonoid.toZero.{max u2 u5} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (DistribSMul.toSMulZeroClass.{u2, max u2 u5} Rₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (AddMonoid.toAddZeroClass.{max u2 u5} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (DistribMulAction.toDistribSMul.{u2, max u2 u5} Rₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (MonoidWithZero.toMonoid.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (Module.toDistribMulAction.{u2, max u2 u5} Rₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (DistribMulActionHomClass.toSMulHomClass.{max (max u2 u1) u5, u2, u1, max u2 u5} (LinearEquiv.{u2, u2, u1, max u2 u5} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) Rₛ Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (MonoidWithZero.toMonoid.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (AddCommMonoid.toAddMonoid.{u1} Aₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (Module.toDistribMulAction.{u2, u1} Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8)) (Module.toDistribMulAction.{u2, max u2 u5} Rₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (SemilinearMapClass.distribMulActionHomClass.{u2, u1, max u2 u5, max (max u2 u1) u5} Rₛ Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (LinearEquiv.{u2, u2, u1, max u2 u5} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (SemilinearEquivClass.instSemilinearMapClass.{u2, u2, u1, max u2 u5, max (max u2 u1) u5} Rₛ Rₛ Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (LinearEquiv.{u2, u2, u1, max u2 u5} Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u2, u2, u1, max u2 u5} Rₛ Rₛ Aₛ (Finsupp.{u5, u2} ι Rₛ (MonoidWithZero.toZero.{u2} Rₛ (Semiring.toMonoidWithZero.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Finsupp.addCommMonoid.{u5, u2} ι Rₛ (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Finsupp.module.{u5, u2, u2} ι Rₛ Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (Semiring.toModule.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHom.id.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHomInvPair.ids.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))))))) (Basis.repr.{u5, u2, u1} ι Rₛ Aₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} Aₛ (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} Aₛ (NonAssocRing.toNonUnitalNonAssocRing.{u1} Aₛ (Ring.toNonAssocRing.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (Algebra.toModule.{u2, u1} Rₛ Aₛ (CommRing.toCommSemiring.{u2} Rₛ _inst_2) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_8) (Basis.localizationLocalization.{u4, u2, u3, u1, u5} R Rₛ _inst_1 _inst_2 _inst_3 S hT A _inst_4 _inst_5 Aₛ _inst_6 _inst_7 _inst_8 _inst_9 _inst_10 _inst_11 hA ι b)) (FunLike.coe.{max (succ u3) (succ u1), succ u3, succ u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => Aₛ) _x) (MulHomClass.toFunLike.{max u3 u1, u3, u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A Aₛ (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))))) (NonUnitalNonAssocSemiring.toMul.{u1} Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} Aₛ (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A Aₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} Aₛ (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) (RingHomClass.toNonUnitalRingHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)))) A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))) (RingHom.instRingHomClassRingHom.{u3, u1} A Aₛ (Semiring.toNonAssocSemiring.{u3} A (CommSemiring.toSemiring.{u3} A (CommRing.toCommSemiring.{u3} A _inst_4))) (Semiring.toNonAssocSemiring.{u1} Aₛ (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6))))))) (algebraMap.{u3, u1} A Aₛ (CommRing.toCommSemiring.{u3} A _inst_4) (Ring.toSemiring.{u1} Aₛ (CommRing.toRing.{u1} Aₛ _inst_6)) _inst_7) x)) i) (FunLike.coe.{max (succ u4) (succ u2), succ u4, succ u2} (RingHom.{u4, u2} R Rₛ (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Rₛ) _x) (MulHomClass.toFunLike.{max u4 u2, u4, u2} (RingHom.{u4, u2} R Rₛ (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) R Rₛ (NonUnitalNonAssocSemiring.toMul.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{max u4 u2, u4, u2} (RingHom.{u4, u2} R Rₛ (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) R Rₛ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} Rₛ (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{max u4 u2, u4, u2} (RingHom.{u4, u2} R Rₛ (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)))) R Rₛ (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))) (RingHom.instRingHomClassRingHom.{u4, u2} R Rₛ (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R (CommRing.toCommSemiring.{u4} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} Rₛ (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2))))))) (algebraMap.{u4, u2} R Rₛ (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u2} Rₛ (CommRing.toRing.{u2} Rₛ _inst_2)) _inst_3) (FunLike.coe.{max (succ u5) (succ u4), succ u5, succ u4} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => R) _x) (Finsupp.funLike.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (FunLike.coe.{max (max (succ u4) (succ u3)) (succ u5), succ u3, max (succ u4) (succ u5)} (LinearEquiv.{u4, u4, u3, max u4 u5} R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) _x) (SMulHomClass.toFunLike.{max (max u4 u3) u5, u4, u3, max u4 u5} (LinearEquiv.{u4, u4, u3, max u4 u5} R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) R A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (SMulZeroClass.toSMul.{u4, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))))) (DistribSMul.toSMulZeroClass.{u4, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))))) (DistribMulAction.toDistribSMul.{u4, u3} R A (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4)))))) (Module.toDistribMulAction.{u4, u3} R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5))))) (SMulZeroClass.toSMul.{u4, max u4 u5} R (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (AddMonoid.toZero.{max u4 u5} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (AddCommMonoid.toAddMonoid.{max u4 u5} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))))) (DistribSMul.toSMulZeroClass.{u4, max u4 u5} R (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (AddMonoid.toAddZeroClass.{max u4 u5} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (AddCommMonoid.toAddMonoid.{max u4 u5} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))))) (DistribMulAction.toDistribSMul.{u4, max u4 u5} R (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u4 u5} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))))) (Module.toDistribMulAction.{u4, max u4 u5} R (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))))) (DistribMulActionHomClass.toSMulHomClass.{max (max u4 u3) u5, u4, u3, max u4 u5} (LinearEquiv.{u4, u4, u3, max u4 u5} R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) R A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4)))))) (AddCommMonoid.toAddMonoid.{max u4 u5} (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))))) (Module.toDistribMulAction.{u4, u3} R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5)) (Module.toDistribMulAction.{u4, max u4 u5} R (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (SemilinearMapClass.distribMulActionHomClass.{u4, u3, max u4 u5, max (max u4 u3) u5} R A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (LinearEquiv.{u4, u4, u3, max u4 u5} R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (SemilinearEquivClass.instSemilinearMapClass.{u4, u4, u3, max u4 u5, max (max u4 u3) u5} R R A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (LinearEquiv.{u4, u4, u3, max u4 u5} R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u4, u4, u3, max u4 u5} R R A (Finsupp.{u5, u4} ι R (MonoidWithZero.toZero.{u4} R (Semiring.toMonoidWithZero.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Finsupp.addCommMonoid.{u5, u4} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) (Finsupp.module.{u5, u4, u4} ι R R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))))) (Semiring.toModule.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHom.id.{u4} R (Semiring.toNonAssocSemiring.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1))) (RingHomInvPair.ids.{u4} R (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)))))))) (Basis.repr.{u5, u4, u3} ι R A (Ring.toSemiring.{u4} R (CommRing.toRing.{u4} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} A (NonAssocRing.toNonUnitalNonAssocRing.{u3} A (Ring.toNonAssocRing.{u3} A (CommRing.toRing.{u3} A _inst_4))))) (Algebra.toModule.{u4, u3} R A (CommRing.toCommSemiring.{u4} R _inst_1) (Ring.toSemiring.{u3} A (CommRing.toRing.{u3} A _inst_4)) _inst_5) b) x) i))
Case conversion may be inaccurate. Consider using '#align basis.localization_localization_repr_algebra_map Basis.localizationLocalization_repr_algebraMapₓ'. -/
@[simp]
theorem Basis.localizationLocalization_repr_algebraMap {ι : Type _} (b : Basis ι R A) (x i) :
    (b.localization_localization Rₛ S Aₛ).repr (algebraMap A Aₛ x) i =
      algebraMap R Rₛ (b.repr x i) :=
  calc
    (b.localization_localization Rₛ S Aₛ).repr (algebraMap A Aₛ x) i =
        (b.localization_localization Rₛ S Aₛ).repr
          ((b.repr x).Sum fun j c => algebraMap R Rₛ c • algebraMap A Aₛ (b j)) i :=
      by
      simp_rw [IsScalarTower.algebraMap_smul, Algebra.smul_def,
        IsScalarTower.algebraMap_apply R A Aₛ, ← _root_.map_mul, ← map_finsupp_sum, ←
        Algebra.smul_def, ← Finsupp.total_apply, Basis.total_repr]
    _ = (b.repr x).Sum fun j c => algebraMap R Rₛ c • Finsupp.single j 1 i := by
      simp_rw [← b.localization_localization_apply Rₛ S Aₛ, map_finsupp_sum, LinearEquiv.map_smul,
        Basis.repr_self, Finsupp.sum_apply, Finsupp.smul_apply]
    _ = _ :=
      (Finset.sum_eq_single i (fun j _ hj => by simp [hj]) fun hi => by
        simp [finsupp.not_mem_support_iff.mp hi])
    _ = algebraMap R Rₛ (b.repr x i) := by simp [Algebra.smul_def]

#align basis.localization_localization_repr_algebra_map Basis.localizationLocalization_repr_algebraMap

end LocalizationLocalization

end Localization

section FractionRing

variable (R K : Type _) [CommRing R] [Field K] [Algebra R K] [IsFractionRing R K]

variable {V : Type _} [AddCommGroup V] [Module R V] [Module K V] [IsScalarTower R K V]

/- warning: linear_independent.iff_fraction_ring -> LinearIndependent.iff_fractionRing is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (K : Type.{u2}) [_inst_1 : CommRing.{u1} R] [_inst_2 : Field.{u2} K] [_inst_3 : Algebra.{u1, u2} R K (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2)))] [_inst_4 : IsFractionRing.{u1, u2} R _inst_1 K (Field.toCommRing.{u2} K _inst_2) _inst_3] {V : Type.{u3}} [_inst_5 : AddCommGroup.{u3} V] [_inst_6 : Module.{u1, u3} R V (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)] [_inst_7 : Module.{u2, u3} K V (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))) (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)] [_inst_8 : IsScalarTower.{u1, u2, u3} R K V (SMulZeroClass.toHasSmul.{u1, u2} R K (AddZeroClass.toHasZero.{u2} K (AddMonoid.toAddZeroClass.{u2} K (AddCommMonoid.toAddMonoid.{u2} K (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} K (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R K (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u2} K (AddMonoid.toAddZeroClass.{u2} K (AddCommMonoid.toAddMonoid.{u2} K (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} K (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R K (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u2} K (AddMonoid.toAddZeroClass.{u2} K (AddCommMonoid.toAddMonoid.{u2} K (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} K (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))))))))) (Module.toMulActionWithZero.{u1, u2} R K (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} K (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2)))))) (Algebra.toModule.{u1, u2} R K (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))) _inst_3))))) (SMulZeroClass.toHasSmul.{u2, u3} K V (AddZeroClass.toHasZero.{u3} V (AddMonoid.toAddZeroClass.{u3} V (AddCommMonoid.toAddMonoid.{u3} V (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)))) (SMulWithZero.toSmulZeroClass.{u2, u3} K V (MulZeroClass.toHasZero.{u2} K (MulZeroOneClass.toMulZeroClass.{u2} K (MonoidWithZero.toMulZeroOneClass.{u2} K (Semiring.toMonoidWithZero.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))))))) (AddZeroClass.toHasZero.{u3} V (AddMonoid.toAddZeroClass.{u3} V (AddCommMonoid.toAddMonoid.{u3} V (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)))) (MulActionWithZero.toSMulWithZero.{u2, u3} K V (Semiring.toMonoidWithZero.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2)))) (AddZeroClass.toHasZero.{u3} V (AddMonoid.toAddZeroClass.{u3} V (AddCommMonoid.toAddMonoid.{u3} V (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)))) (Module.toMulActionWithZero.{u2, u3} K V (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))) (AddCommGroup.toAddCommMonoid.{u3} V _inst_5) _inst_7)))) (SMulZeroClass.toHasSmul.{u1, u3} R V (AddZeroClass.toHasZero.{u3} V (AddMonoid.toAddZeroClass.{u3} V (AddCommMonoid.toAddMonoid.{u3} V (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R V (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} V (AddMonoid.toAddZeroClass.{u3} V (AddCommMonoid.toAddMonoid.{u3} V (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R V (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (AddZeroClass.toHasZero.{u3} V (AddMonoid.toAddZeroClass.{u3} V (AddCommMonoid.toAddMonoid.{u3} V (AddCommGroup.toAddCommMonoid.{u3} V _inst_5)))) (Module.toMulActionWithZero.{u1, u3} R V (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} V _inst_5) _inst_6))))] {ι : Type.{u4}} {b : ι -> V}, Iff (LinearIndependent.{u4, u1, u3} ι R V b (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} V _inst_5) _inst_6) (LinearIndependent.{u4, u2, u3} ι K V b (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_2))) (AddCommGroup.toAddCommMonoid.{u3} V _inst_5) _inst_7)
but is expected to have type
  forall (R : Type.{u3}) (K : Type.{u1}) [_inst_1 : CommRing.{u3} R] [_inst_2 : Field.{u1} K] [_inst_3 : Algebra.{u3, u1} R K (CommRing.toCommSemiring.{u3} R _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_2)))] [_inst_4 : IsFractionRing.{u3, u1} R _inst_1 K (Field.toCommRing.{u1} K _inst_2) _inst_3] {V : Type.{u2}} [_inst_5 : AddCommGroup.{u2} V] [_inst_6 : Module.{u3, u2} R V (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u2} V _inst_5)] [_inst_7 : Module.{u1, u2} K V (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_2))) (AddCommGroup.toAddCommMonoid.{u2} V _inst_5)] [_inst_8 : IsScalarTower.{u3, u1, u2} R K V (Algebra.toSMul.{u3, u1} R K (CommRing.toCommSemiring.{u3} R _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_2))) _inst_3) (SMulZeroClass.toSMul.{u1, u2} K V (NegZeroClass.toZero.{u2} V (SubNegZeroMonoid.toNegZeroClass.{u2} V (SubtractionMonoid.toSubNegZeroMonoid.{u2} V (SubtractionCommMonoid.toSubtractionMonoid.{u2} V (AddCommGroup.toDivisionAddCommMonoid.{u2} V _inst_5))))) (SMulWithZero.toSMulZeroClass.{u1, u2} K V (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (Field.toSemifield.{u1} K _inst_2)))) (NegZeroClass.toZero.{u2} V (SubNegZeroMonoid.toNegZeroClass.{u2} V (SubtractionMonoid.toSubNegZeroMonoid.{u2} V (SubtractionCommMonoid.toSubtractionMonoid.{u2} V (AddCommGroup.toDivisionAddCommMonoid.{u2} V _inst_5))))) (MulActionWithZero.toSMulWithZero.{u1, u2} K V (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_2)))) (NegZeroClass.toZero.{u2} V (SubNegZeroMonoid.toNegZeroClass.{u2} V (SubtractionMonoid.toSubNegZeroMonoid.{u2} V (SubtractionCommMonoid.toSubtractionMonoid.{u2} V (AddCommGroup.toDivisionAddCommMonoid.{u2} V _inst_5))))) (Module.toMulActionWithZero.{u1, u2} K V (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_2))) (AddCommGroup.toAddCommMonoid.{u2} V _inst_5) _inst_7)))) (SMulZeroClass.toSMul.{u3, u2} R V (NegZeroClass.toZero.{u2} V (SubNegZeroMonoid.toNegZeroClass.{u2} V (SubtractionMonoid.toSubNegZeroMonoid.{u2} V (SubtractionCommMonoid.toSubtractionMonoid.{u2} V (AddCommGroup.toDivisionAddCommMonoid.{u2} V _inst_5))))) (SMulWithZero.toSMulZeroClass.{u3, u2} R V (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R (CommRing.toCommSemiring.{u3} R _inst_1))) (NegZeroClass.toZero.{u2} V (SubNegZeroMonoid.toNegZeroClass.{u2} V (SubtractionMonoid.toSubNegZeroMonoid.{u2} V (SubtractionCommMonoid.toSubtractionMonoid.{u2} V (AddCommGroup.toDivisionAddCommMonoid.{u2} V _inst_5))))) (MulActionWithZero.toSMulWithZero.{u3, u2} R V (Semiring.toMonoidWithZero.{u3} R (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1))) (NegZeroClass.toZero.{u2} V (SubNegZeroMonoid.toNegZeroClass.{u2} V (SubtractionMonoid.toSubNegZeroMonoid.{u2} V (SubtractionCommMonoid.toSubtractionMonoid.{u2} V (AddCommGroup.toDivisionAddCommMonoid.{u2} V _inst_5))))) (Module.toMulActionWithZero.{u3, u2} R V (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u2} V _inst_5) _inst_6))))] {ι : Type.{u4}} {b : ι -> V}, Iff (LinearIndependent.{u4, u3, u2} ι R V b (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u2} V _inst_5) _inst_6) (LinearIndependent.{u4, u1, u2} ι K V b (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_2))) (AddCommGroup.toAddCommMonoid.{u2} V _inst_5) _inst_7)
Case conversion may be inaccurate. Consider using '#align linear_independent.iff_fraction_ring LinearIndependent.iff_fractionRingₓ'. -/
theorem LinearIndependent.iff_fractionRing {ι : Type _} {b : ι → V} :
    LinearIndependent R b ↔ LinearIndependent K b :=
  ⟨LinearIndependent.localization K R⁰,
    LinearIndependent.restrict_scalars (smul_left_injective R one_ne_zero)⟩
#align linear_independent.iff_fraction_ring LinearIndependent.iff_fractionRing

end FractionRing