/-
Copyright (c) 2020 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau

! This file was ported from Lean 3 source module ring_theory.algebra_tower
! leanprover-community/mathlib commit 932872382355f00112641d305ba0619305dc8642
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.Algebra.Tower
import Mathbin.Algebra.Invertible
import Mathbin.Algebra.Module.BigOperators
import Mathbin.LinearAlgebra.Basis

/-!
# Towers of algebras

> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a corresponding PR to mathlib4.

We set up the basic theory of algebra towers.
An algebra tower A/S/R is expressed by having instances of `algebra A S`,
`algebra R S`, `algebra R A` and `is_scalar_tower R S A`, the later asserting the
compatibility condition `(r • s) • a = r • (s • a)`.

In `field_theory/tower.lean` we use this to prove the tower law for finite extensions,
that if `R` and `S` are both fields, then `[A:R] = [A:S] [S:A]`.

In this file we prepare the main lemma:
if `{bi | i ∈ I}` is an `R`-basis of `S` and `{cj | j ∈ J}` is a `S`-basis
of `A`, then `{bi cj | i ∈ I, j ∈ J}` is an `R`-basis of `A`. This statement does not require the
base rings to be a field, so we also generalize the lemma to rings in this file.
-/

open Pointwise

universe u v w u₁

variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁)

namespace IsScalarTower

section Semiring

variable [CommSemiring R] [CommSemiring S] [Semiring A] [Semiring B]

variable [Algebra R S] [Algebra S A] [Algebra S B] [Algebra R A] [Algebra R B]

variable [IsScalarTower R S A] [IsScalarTower R S B]

variable (R S A B)

/- warning: is_scalar_tower.invertible.algebra_tower -> IsScalarTower.Invertible.algebraTower is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (A : Type.{u3}) [_inst_1 : CommSemiring.{u1} R] [_inst_2 : CommSemiring.{u2} S] [_inst_3 : Semiring.{u3} A] [_inst_5 : Algebra.{u1, u2} R S _inst_1 (CommSemiring.toSemiring.{u2} S _inst_2)] [_inst_6 : Algebra.{u2, u3} S A _inst_2 _inst_3] [_inst_8 : Algebra.{u1, u3} R A _inst_1 _inst_3] [_inst_10 : IsScalarTower.{u1, u2, u3} R S A (SMulZeroClass.toHasSmul.{u1, u2} R S (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R S (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R S (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))))) (Module.toMulActionWithZero.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)))) (Algebra.toModule.{u1, u2} R S _inst_1 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5))))) (SMulZeroClass.toHasSmul.{u2, u3} S 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 _inst_3)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} S A (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} S A (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3)))))) (Module.toMulActionWithZero.{u2, u3} S A (CommSemiring.toSemiring.{u2} S _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3))) (Algebra.toModule.{u2, u3} S A _inst_2 _inst_3 _inst_6))))) (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 _inst_3)))))) (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 _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 _inst_3)))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{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 _inst_3)))))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3))) (Algebra.toModule.{u1, u3} R A _inst_1 _inst_3 _inst_8)))))] (r : R) [_inst_12 : Invertible.{u2} S (Distrib.toHasMul.{u2} S (NonUnitalNonAssocSemiring.toDistrib.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))) (AddMonoidWithOne.toOne.{u2} S (AddCommMonoidWithOne.toAddMonoidWithOne.{u2} S (NonAssocSemiring.toAddCommMonoidWithOne.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (algebraMap.{u1, u2} R S _inst_1 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5) r)], Invertible.{u3} A (MulOneClass.toHasMul.{u3} A (MulZeroOneClass.toMulOneClass.{u3} A (NonAssocSemiring.toMulZeroOneClass.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3)))) (MulOneClass.toHasOne.{u3} A (MulZeroOneClass.toMulOneClass.{u3} A (NonAssocSemiring.toMulZeroOneClass.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3)))) (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (RingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) (fun (_x : RingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) => R -> A) (RingHom.hasCoeToFun.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) (algebraMap.{u1, u3} R A _inst_1 _inst_3 _inst_8) r)
but is expected to have type
  forall (R : Type.{u1}) (S : Type.{u2}) (A : Type.{u3}) [_inst_1 : CommSemiring.{u1} R] [_inst_2 : CommSemiring.{u2} S] [_inst_3 : Semiring.{u3} A] [_inst_5 : Algebra.{u1, u2} R S _inst_1 (CommSemiring.toSemiring.{u2} S _inst_2)] [_inst_6 : Algebra.{u2, u3} S A _inst_2 _inst_3] [_inst_8 : Algebra.{u1, u3} R A _inst_1 _inst_3] [_inst_10 : IsScalarTower.{u1, u2, u3} R S A (Algebra.toSMul.{u1, u2} R S _inst_1 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5) (Algebra.toSMul.{u2, u3} S A _inst_2 _inst_3 _inst_6) (Algebra.toSMul.{u1, u3} R A _inst_1 _inst_3 _inst_8)] (r : R) [_inst_12 : Invertible.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonUnitalNonAssocSemiring.toMul.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (CommSemiring.toSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_2)))) (Semiring.toOne.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (CommSemiring.toSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_2)) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (RingHom.instRingHomClassRingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)))))) (algebraMap.{u1, u2} R S _inst_1 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5) r)], Invertible.{u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (NonUnitalNonAssocSemiring.toMul.{u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Semiring.toNonAssocSemiring.{u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_3))) (Semiring.toOne.{u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_3) (FunLike.coe.{max (succ u1) (succ u3), succ u1, succ u3} (RingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) _x) (MulHomClass.toFunLike.{max u1 u3, u1, u3} (RingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) R A (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u3, u1, u3} (RingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) R A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_3)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u3, u1, u3} (RingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3)) R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3) (RingHom.instRingHomClassRingHom.{u1, u3} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u3} A _inst_3))))) (algebraMap.{u1, u3} R A _inst_1 _inst_3 _inst_8) r)
Case conversion may be inaccurate. Consider using '#align is_scalar_tower.invertible.algebra_tower IsScalarTower.Invertible.algebraTowerₓ'. -/
/-- Suppose that `R -> S -> A` is a tower of algebras.
If an element `r : R` is invertible in `S`, then it is invertible in `A`. -/
def Invertible.algebraTower (r : R) [Invertible (algebraMap R S r)] :
    Invertible (algebraMap R A r) :=
  Invertible.copy (Invertible.map (algebraMap S A) (algebraMap R S r)) (algebraMap R A r)
    (IsScalarTower.algebraMap_apply R S A r)
#align is_scalar_tower.invertible.algebra_tower IsScalarTower.Invertible.algebraTower

/- warning: is_scalar_tower.invertible_algebra_coe_nat -> IsScalarTower.invertibleAlgebraCoeNat is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (A : Type.{u2}) [_inst_1 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} A] [_inst_8 : Algebra.{u1, u2} R A _inst_1 _inst_3] (n : Nat) [inv : Invertible.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddMonoidWithOne.toOne.{u1} R (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} R (NonAssocSemiring.toAddCommMonoidWithOne.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat R (HasLiftT.mk.{1, succ u1} Nat R (CoeTCₓ.coe.{1, succ u1} Nat R (Nat.castCoe.{u1} R (AddMonoidWithOne.toNatCast.{u1} R (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} R (NonAssocSemiring.toAddCommMonoidWithOne.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))))) n)], Invertible.{u2} A (Distrib.toHasMul.{u2} A (NonUnitalNonAssocSemiring.toDistrib.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_3)))) (AddMonoidWithOne.toOne.{u2} A (AddCommMonoidWithOne.toAddMonoidWithOne.{u2} A (NonAssocSemiring.toAddCommMonoidWithOne.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_3)))) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat A (HasLiftT.mk.{1, succ u2} Nat A (CoeTCₓ.coe.{1, succ u2} Nat A (Nat.castCoe.{u2} A (AddMonoidWithOne.toNatCast.{u2} A (AddCommMonoidWithOne.toAddMonoidWithOne.{u2} A (NonAssocSemiring.toAddCommMonoidWithOne.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_3))))))) n)
but is expected to have type
  forall (R : Type.{u1}) (A : Type.{u2}) [_inst_1 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} A] [_inst_8 : Algebra.{u1, u2} R A _inst_1 _inst_3] (n : Nat) [inv : Invertible.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toOne.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Nat.cast.{u1} R (Semiring.toNatCast.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) n)], Invertible.{u2} A (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_3))) (Semiring.toOne.{u2} A _inst_3) (Nat.cast.{u2} A (Semiring.toNatCast.{u2} A _inst_3) n)
Case conversion may be inaccurate. Consider using '#align is_scalar_tower.invertible_algebra_coe_nat IsScalarTower.invertibleAlgebraCoeNatₓ'. -/
/-- A natural number that is invertible when coerced to `R` is also invertible
when coerced to any `R`-algebra. -/
def invertibleAlgebraCoeNat (n : ℕ) [inv : Invertible (n : R)] : Invertible (n : A) :=
  haveI : Invertible (algebraMap ℕ R n) := inv
  invertible.algebra_tower ℕ R A n
#align is_scalar_tower.invertible_algebra_coe_nat IsScalarTower.invertibleAlgebraCoeNat

end Semiring

section CommSemiring

variable [CommSemiring R] [CommSemiring A] [CommSemiring B]

variable [Algebra R A] [Algebra A B] [Algebra R B] [IsScalarTower R A B]

end CommSemiring

end IsScalarTower

section AlgebraMapCoeffs

variable {R} (A) {ι M : Type _} [CommSemiring R] [Semiring A] [AddCommMonoid M]

variable [Algebra R A] [Module A M] [Module R M] [IsScalarTower R A M]

variable (b : Basis ι R M) (h : Function.Bijective (algebraMap R A))

/- warning: basis.algebra_map_coeffs -> Basis.algebraMapCoeffs is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (A : Type.{u2}) {ι : Type.{u3}} {M : Type.{u4}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : AddCommMonoid.{u4} M] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Module.{u2, u4} A M _inst_2 _inst_3] [_inst_6 : Module.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u4} R A M (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (Module.toMulActionWithZero.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toHasSmul.{u2, u4} A M (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (SMulWithZero.toSmulZeroClass.{u2, u4} A M (MulZeroClass.toHasZero.{u2} A (MulZeroOneClass.toMulZeroClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A _inst_2)))) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (MulActionWithZero.toSMulWithZero.{u2, u4} A M (Semiring.toMonoidWithZero.{u2} A _inst_2) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (Module.toMulActionWithZero.{u2, u4} A M _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toHasSmul.{u1, u4} R M (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (SMulWithZero.toSmulZeroClass.{u1, u4} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (MulActionWithZero.toSMulWithZero.{u1, u4} R M (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (Module.toMulActionWithZero.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))], (Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) -> (Function.Bijective.{succ u1, succ u2} R A (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (fun (_x : RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) => R -> A) (RingHom.hasCoeToFun.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (algebraMap.{u1, u2} R A _inst_1 _inst_2 _inst_4))) -> (Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5)
but is expected to have type
  forall {R : Type.{u1}} (A : Type.{u2}) {ι : Type.{u3}} {M : Type.{u4}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : AddCommMonoid.{u4} M] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Module.{u2, u4} A M _inst_2 _inst_3] [_inst_6 : Module.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u4} R A M (Algebra.toSMul.{u1, u2} R A _inst_1 _inst_2 _inst_4) (SMulZeroClass.toSMul.{u2, u4} A M (AddMonoid.toZero.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3)) (SMulWithZero.toSMulZeroClass.{u2, u4} A M (MonoidWithZero.toZero.{u2} A (Semiring.toMonoidWithZero.{u2} A _inst_2)) (AddMonoid.toZero.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3)) (MulActionWithZero.toSMulWithZero.{u2, u4} A M (Semiring.toMonoidWithZero.{u2} A _inst_2) (AddMonoid.toZero.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3)) (Module.toMulActionWithZero.{u2, u4} A M _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u1, u4} R M (AddMonoid.toZero.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3)) (SMulWithZero.toSMulZeroClass.{u1, u4} R M (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R _inst_1)) (AddMonoid.toZero.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3)) (MulActionWithZero.toSMulWithZero.{u1, u4} R M (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddMonoid.toZero.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3)) (Module.toMulActionWithZero.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))], (Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) -> (Function.Bijective.{succ u1, succ u2} R A (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) R A (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) R A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2) (RingHom.instRingHomClassRingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2))))) (algebraMap.{u1, u2} R A _inst_1 _inst_2 _inst_4))) -> (Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5)
Case conversion may be inaccurate. Consider using '#align basis.algebra_map_coeffs Basis.algebraMapCoeffsₓ'. -/
/-- If `R` and `A` have a bijective `algebra_map R A` and act identically on `M`,
then a basis for `M` as `R`-module is also a basis for `M` as `R'`-module. -/
@[simps]
noncomputable def Basis.algebraMapCoeffs : Basis ι A M :=
  b.mapCoeffs (RingEquiv.ofBijective _ h) fun c x => by simp
#align basis.algebra_map_coeffs Basis.algebraMapCoeffs

/- warning: basis.algebra_map_coeffs_apply -> Basis.algebraMapCoeffs_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (A : Type.{u2}) {ι : Type.{u3}} {M : Type.{u4}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : AddCommMonoid.{u4} M] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Module.{u2, u4} A M _inst_2 _inst_3] [_inst_6 : Module.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u4} R A M (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (Module.toMulActionWithZero.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toHasSmul.{u2, u4} A M (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (SMulWithZero.toSmulZeroClass.{u2, u4} A M (MulZeroClass.toHasZero.{u2} A (MulZeroOneClass.toMulZeroClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A _inst_2)))) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (MulActionWithZero.toSMulWithZero.{u2, u4} A M (Semiring.toMonoidWithZero.{u2} A _inst_2) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (Module.toMulActionWithZero.{u2, u4} A M _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toHasSmul.{u1, u4} R M (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (SMulWithZero.toSmulZeroClass.{u1, u4} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (MulActionWithZero.toSMulWithZero.{u1, u4} R M (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (Module.toMulActionWithZero.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))] (b : Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) (h : Function.Bijective.{succ u1, succ u2} R A (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (fun (_x : RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) => R -> A) (RingHom.hasCoeToFun.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (algebraMap.{u1, u2} R A _inst_1 _inst_2 _inst_4))) (i : ι), Eq.{succ u4} M (coeFn.{max (succ u3) (succ u2) (succ u4), max (succ u3) (succ u4)} (Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) (fun (_x : Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) => ι -> M) (FunLike.hasCoeToFun.{max (succ u3) (succ u2) (succ u4), succ u3, succ u4} (Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) ι (fun (_x : ι) => M) (Basis.funLike.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5)) (Basis.algebraMapCoeffs.{u1, u2, u3, u4} R A ι M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 b h) i) (coeFn.{max (succ u3) (succ u1) (succ u4), max (succ u3) (succ u4)} (Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) (fun (_x : Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) => ι -> M) (FunLike.hasCoeToFun.{max (succ u3) (succ u1) (succ u4), succ u3, succ u4} (Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) ι (fun (_x : ι) => M) (Basis.funLike.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6)) b i)
but is expected to have type
  forall {R : Type.{u3}} (A : Type.{u4}) {ι : Type.{u1}} {M : Type.{u2}} [_inst_1 : CommSemiring.{u3} R] [_inst_2 : Semiring.{u4} A] [_inst_3 : AddCommMonoid.{u2} M] [_inst_4 : Algebra.{u3, u4} R A _inst_1 _inst_2] [_inst_5 : Module.{u4, u2} A M _inst_2 _inst_3] [_inst_6 : Module.{u3, u2} R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u3, u4, u2} R A M (Algebra.toSMul.{u3, u4} R A _inst_1 _inst_2 _inst_4) (SMulZeroClass.toSMul.{u4, u2} A M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_3)) (SMulWithZero.toSMulZeroClass.{u4, u2} A M (MonoidWithZero.toZero.{u4} A (Semiring.toMonoidWithZero.{u4} A _inst_2)) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_3)) (MulActionWithZero.toSMulWithZero.{u4, u2} A M (Semiring.toMonoidWithZero.{u4} A _inst_2) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_3)) (Module.toMulActionWithZero.{u4, u2} A M _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u3, u2} R M (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_3)) (SMulWithZero.toSMulZeroClass.{u3, u2} R M (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_1)) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_3)) (MulActionWithZero.toSMulWithZero.{u3, u2} R M (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (AddMonoid.toZero.{u2} M (AddCommMonoid.toAddMonoid.{u2} M _inst_3)) (Module.toMulActionWithZero.{u3, u2} R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6))))] (b : Basis.{u1, u3, u2} ι R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6) (h : Function.Bijective.{succ u3, succ u4} R A (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) _x) (MulHomClass.toFunLike.{max u3 u4, u3, u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R A (NonUnitalNonAssocSemiring.toMul.{u3} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u4, u3, u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u3 u4, u3, u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2) (RingHom.instRingHomClassRingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2))))) (algebraMap.{u3, u4} R A _inst_1 _inst_2 _inst_4))) (i : ι), Eq.{succ u2} ((fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => M) i) (FunLike.coe.{max (max (succ u4) (succ u1)) (succ u2), succ u1, succ u2} (Basis.{u1, u4, u2} ι A M _inst_2 _inst_3 _inst_5) ι (fun (_x : ι) => (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => M) _x) (Basis.funLike.{u1, u4, u2} ι A M _inst_2 _inst_3 _inst_5) (Basis.algebraMapCoeffs.{u3, u4, u1, u2} R A ι M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 b h) i) (FunLike.coe.{max (max (succ u3) (succ u1)) (succ u2), succ u1, succ u2} (Basis.{u1, u3, u2} ι R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6) ι (fun (_x : ι) => (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => M) _x) (Basis.funLike.{u1, u3, u2} ι R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6) b i)
Case conversion may be inaccurate. Consider using '#align basis.algebra_map_coeffs_apply Basis.algebraMapCoeffs_applyₓ'. -/
theorem Basis.algebraMapCoeffs_apply (i : ι) : b.algebraMapCoeffs A h i = b i :=
  b.mapCoeffs_apply _ _ _
#align basis.algebra_map_coeffs_apply Basis.algebraMapCoeffs_apply

/- warning: basis.coe_algebra_map_coeffs -> Basis.coe_algebraMapCoeffs is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} (A : Type.{u2}) {ι : Type.{u3}} {M : Type.{u4}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} A] [_inst_3 : AddCommMonoid.{u4} M] [_inst_4 : Algebra.{u1, u2} R A _inst_1 _inst_2] [_inst_5 : Module.{u2, u4} A M _inst_2 _inst_3] [_inst_6 : Module.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u4} R A M (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R A (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2)))))) (Module.toMulActionWithZero.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_2))) (Algebra.toModule.{u1, u2} R A _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toHasSmul.{u2, u4} A M (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (SMulWithZero.toSmulZeroClass.{u2, u4} A M (MulZeroClass.toHasZero.{u2} A (MulZeroOneClass.toMulZeroClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A _inst_2)))) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (MulActionWithZero.toSMulWithZero.{u2, u4} A M (Semiring.toMonoidWithZero.{u2} A _inst_2) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (Module.toMulActionWithZero.{u2, u4} A M _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toHasSmul.{u1, u4} R M (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (SMulWithZero.toSmulZeroClass.{u1, u4} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (MulActionWithZero.toSMulWithZero.{u1, u4} R M (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u4} M (AddMonoid.toAddZeroClass.{u4} M (AddCommMonoid.toAddMonoid.{u4} M _inst_3))) (Module.toMulActionWithZero.{u1, u4} R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))] (b : Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) (h : Function.Bijective.{succ u1, succ u2} R A (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (fun (_x : RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) => R -> A) (RingHom.hasCoeToFun.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (Semiring.toNonAssocSemiring.{u2} A _inst_2)) (algebraMap.{u1, u2} R A _inst_1 _inst_2 _inst_4))), Eq.{max (succ u3) (succ u4)} ((fun (_x : Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) => ι -> M) (Basis.algebraMapCoeffs.{u1, u2, u3, u4} R A ι M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 b h)) (coeFn.{max (succ u3) (succ u2) (succ u4), max (succ u3) (succ u4)} (Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) (fun (_x : Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) => ι -> M) (FunLike.hasCoeToFun.{max (succ u3) (succ u2) (succ u4), succ u3, succ u4} (Basis.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5) ι (fun (_x : ι) => M) (Basis.funLike.{u3, u2, u4} ι A M _inst_2 _inst_3 _inst_5)) (Basis.algebraMapCoeffs.{u1, u2, u3, u4} R A ι M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 b h)) (coeFn.{max (succ u3) (succ u1) (succ u4), max (succ u3) (succ u4)} (Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) (fun (_x : Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) => ι -> M) (FunLike.hasCoeToFun.{max (succ u3) (succ u1) (succ u4), succ u3, succ u4} (Basis.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) ι (fun (_x : ι) => M) (Basis.funLike.{u3, u1, u4} ι R M (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6)) b)
but is expected to have type
  forall {R : Type.{u3}} (A : Type.{u4}) {ι : Type.{u2}} {M : Type.{u1}} [_inst_1 : CommSemiring.{u3} R] [_inst_2 : Semiring.{u4} A] [_inst_3 : AddCommMonoid.{u1} M] [_inst_4 : Algebra.{u3, u4} R A _inst_1 _inst_2] [_inst_5 : Module.{u4, u1} A M _inst_2 _inst_3] [_inst_6 : Module.{u3, u1} R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u3, u4, u1} R A M (Algebra.toSMul.{u3, u4} R A _inst_1 _inst_2 _inst_4) (SMulZeroClass.toSMul.{u4, u1} A M (AddMonoid.toZero.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_3)) (SMulWithZero.toSMulZeroClass.{u4, u1} A M (MonoidWithZero.toZero.{u4} A (Semiring.toMonoidWithZero.{u4} A _inst_2)) (AddMonoid.toZero.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_3)) (MulActionWithZero.toSMulWithZero.{u4, u1} A M (Semiring.toMonoidWithZero.{u4} A _inst_2) (AddMonoid.toZero.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_3)) (Module.toMulActionWithZero.{u4, u1} A M _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u3, u1} R M (AddMonoid.toZero.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_3)) (SMulWithZero.toSMulZeroClass.{u3, u1} R M (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_1)) (AddMonoid.toZero.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_3)) (MulActionWithZero.toSMulWithZero.{u3, u1} R M (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (AddMonoid.toZero.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_3)) (Module.toMulActionWithZero.{u3, u1} R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6))))] (b : Basis.{u2, u3, u1} ι R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6) (h : Function.Bijective.{succ u3, succ u4} R A (FunLike.coe.{max (succ u3) (succ u4), succ u3, succ u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) _x) (MulHomClass.toFunLike.{max u3 u4, u3, u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R A (NonUnitalNonAssocSemiring.toMul.{u3} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_2))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u4, u3, u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_2)) (RingHomClass.toNonUnitalRingHomClass.{max u3 u4, u3, u4} (RingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2)) R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2) (RingHom.instRingHomClassRingHom.{u3, u4} R A (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_1)) (Semiring.toNonAssocSemiring.{u4} A _inst_2))))) (algebraMap.{u3, u4} R A _inst_1 _inst_2 _inst_4))), Eq.{max (succ u2) (succ u1)} (forall (a : ι), (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => M) a) (FunLike.coe.{max (max (succ u4) (succ u2)) (succ u1), succ u2, succ u1} (Basis.{u2, u4, u1} ι A M _inst_2 _inst_3 _inst_5) ι (fun (_x : ι) => (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => M) _x) (Basis.funLike.{u2, u4, u1} ι A M _inst_2 _inst_3 _inst_5) (Basis.algebraMapCoeffs.{u3, u4, u2, u1} R A ι M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 b h)) (FunLike.coe.{max (max (succ u3) (succ u2)) (succ u1), succ u2, succ u1} (Basis.{u2, u3, u1} ι R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6) ι (fun (_x : ι) => (fun (x._@.Mathlib.LinearAlgebra.Basis._hyg.548 : ι) => M) _x) (Basis.funLike.{u2, u3, u1} ι R M (CommSemiring.toSemiring.{u3} R _inst_1) _inst_3 _inst_6) b)
Case conversion may be inaccurate. Consider using '#align basis.coe_algebra_map_coeffs Basis.coe_algebraMapCoeffsₓ'. -/
@[simp]
theorem Basis.coe_algebraMapCoeffs : (b.algebraMapCoeffs A h : ι → M) = b :=
  b.coe_mapCoeffs _ _
#align basis.coe_algebra_map_coeffs Basis.coe_algebraMapCoeffs

end AlgebraMapCoeffs

section Semiring

open Finsupp

open BigOperators Classical

universe v₁ w₁

variable {R S A}

variable [CommSemiring R] [Semiring S] [AddCommMonoid A]

variable [Algebra R S] [Module S A] [Module R A] [IsScalarTower R S A]

/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
#print linearIndependent_smul /-
theorem linearIndependent_smul {ι : Type v₁} {b : ι → S} {ι' : Type w₁} {c : ι' → A}
    (hb : LinearIndependent R b) (hc : LinearIndependent S c) :
    LinearIndependent R fun p : ι × ι' => b p.1 • c p.2 :=
  by
  rw [linearIndependent_iff'] at hb hc; rw [linearIndependent_iff'']; rintro s g hg hsg ⟨i, k⟩
  by_cases hik : (i, k) ∈ s
  · have h1 : (∑ i in s.image Prod.fst ×ˢ s.image Prod.snd, g i • b i.1 • c i.2) = 0 :=
      by
      rw [← hsg]
      exact
        (Finset.sum_subset Finset.subset_product fun p _ hp =>
            show g p • b p.1 • c p.2 = 0 by rw [hg p hp, zero_smul]).symm
    rw [Finset.sum_product_right] at h1
    simp_rw [← smul_assoc, ← Finset.sum_smul] at h1
    exact hb _ _ (hc _ _ h1 k (Finset.mem_image_of_mem _ hik)) i (Finset.mem_image_of_mem _ hik)
  exact hg _ hik
#align linear_independent_smul linearIndependent_smul
-/

#print Basis.smul /-
/-- `basis.smul (b : basis ι R S) (c : basis ι S A)` is the `R`-basis on `A`
where the `(i, j)`th basis vector is `b i • c j`. -/
noncomputable def Basis.smul {ι : Type v₁} {ι' : Type w₁} (b : Basis ι R S) (c : Basis ι' S A) :
    Basis (ι × ι') R A :=
  Basis.ofRepr
    (c.repr.restrictScalars R ≪≫ₗ
      (Finsupp.lcongr (Equiv.refl _) b.repr ≪≫ₗ
        ((finsuppProdLEquiv R).symm ≪≫ₗ
          Finsupp.lcongr (Equiv.prodComm ι' ι) (LinearEquiv.refl _ _))))
#align basis.smul Basis.smul
-/

/- warning: basis.smul_repr -> Basis.smul_repr is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} S] [_inst_3 : AddCommMonoid.{u3} A] [_inst_4 : Algebra.{u1, u2} R S _inst_1 _inst_2] [_inst_5 : Module.{u2, u3} S A _inst_2 _inst_3] [_inst_6 : Module.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u3} R S A (SMulZeroClass.toHasSmul.{u1, u2} R S (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R S (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R S (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (Module.toMulActionWithZero.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toHasSmul.{u2, u3} S A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (SMulWithZero.toSmulZeroClass.{u2, u3} S A (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (MulActionWithZero.toSMulWithZero.{u2, u3} S A (Semiring.toMonoidWithZero.{u2} S _inst_2) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (Module.toMulActionWithZero.{u2, u3} S A _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (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 _inst_1))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))] {ι : Type.{u4}} {ι' : Type.{u5}} (b : Basis.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4)) (c : Basis.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5) (x : A) (ij : Prod.{u4, u5} ι ι'), Eq.{succ u1} R (coeFn.{max (succ (max u4 u5)) (succ u1), max (succ (max u4 u5)) (succ u1)} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (fun (_x : Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) => (Prod.{u4, u5} ι ι') -> R) (Finsupp.coeFun.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (coeFn.{max (succ u3) (succ (max (max u4 u5) u1)), max (succ u3) (succ (max (max u4 u5) u1))} (LinearEquiv.{u1, u1, u3, max (max u4 u5) u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (fun (_x : LinearEquiv.{u1, u1, u3, max (max u4 u5) u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) => A -> (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (LinearEquiv.hasCoeToFun.{u1, u1, u3, max (max u4 u5) u1} R R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (Basis.repr.{max u4 u5, u1, u3} (Prod.{u4, u5} ι ι') R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6 (Basis.smul.{u1, u2, u3, u4, u5} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 ι ι' b c)) x) ij) (coeFn.{max (succ u4) (succ u1), max (succ u4) (succ u1)} (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (fun (_x : Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) => ι -> R) (Finsupp.coeFun.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (coeFn.{max (succ u2) (succ (max u4 u1)), max (succ u2) (succ (max u4 u1))} (LinearEquiv.{u1, u1, u2, max u4 u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (fun (_x : LinearEquiv.{u1, u1, u2, max u4 u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) => S -> (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (LinearEquiv.hasCoeToFun.{u1, u1, u2, max u4 u1} R R S (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (Basis.repr.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) b) (coeFn.{max (succ u5) (succ u2), max (succ u5) (succ u2)} (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (fun (_x : Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) => ι' -> S) (Finsupp.coeFun.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (coeFn.{max (succ u3) (succ (max u5 u2)), max (succ u3) (succ (max u5 u2))} (LinearEquiv.{u2, u2, u3, max u5 u2} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) (fun (_x : LinearEquiv.{u2, u2, u3, max u5 u2} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) => A -> (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (LinearEquiv.hasCoeToFun.{u2, u2, u3, max u5 u2} S S A (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) _inst_2 _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2)) (Basis.repr.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5 c) x) (Prod.snd.{u4, u5} ι ι' ij))) (Prod.fst.{u4, u5} ι ι' ij))
but is expected to have type
  forall {R : Type.{u1}} {S : Type.{u2}} {A : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} S] [_inst_3 : AddCommMonoid.{u3} A] [_inst_4 : Algebra.{u1, u2} R S _inst_1 _inst_2] [_inst_5 : Module.{u2, u3} S A _inst_2 _inst_3] [_inst_6 : Module.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u3} R S A (Algebra.toSMul.{u1, u2} R S _inst_1 _inst_2 _inst_4) (SMulZeroClass.toSMul.{u2, u3} S A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (SMulWithZero.toSMulZeroClass.{u2, u3} S A (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (MulActionWithZero.toSMulWithZero.{u2, u3} S A (Semiring.toMonoidWithZero.{u2} S _inst_2) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (Module.toMulActionWithZero.{u2, u3} S A _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u1, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R _inst_1)) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))] {ι : Type.{u4}} {ι' : Type.{u5}} (b : Basis.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4)) (c : Basis.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5) (x : A) (ij : Prod.{u4, u5} ι ι'), Eq.{succ u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : Prod.{u4, u5} ι ι') => R) ij) (FunLike.coe.{max (succ (max u4 u5)) (succ u1), succ (max u4 u5), succ u1} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Prod.{u4, u5} ι ι') (fun (_x : Prod.{u4, u5} ι ι') => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : Prod.{u4, u5} ι ι') => R) _x) (Finsupp.funLike.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (FunLike.coe.{max (max (max (succ u1) (succ u4)) (succ u3)) (succ u5), succ u3, max (max (succ u1) (succ u4)) (succ u5)} (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _x) (SMulHomClass.toFunLike.{max (max (max u1 u4) u3) u5, u1, u3, max (max u1 u4) u5} (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SMulZeroClass.toSMul.{u1, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribSMul.toSMulZeroClass.{u1, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribMulAction.toDistribSMul.{u1, u3} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (Module.toDistribMulAction.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6)))) (SMulZeroClass.toSMul.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribSMul.toSMulZeroClass.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulAction.toDistribSMul.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulActionHomClass.toSMulHomClass.{max (max (max u1 u4) u3) u5, u1, u3, max (max u1 u4) u5} (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) (Module.toDistribMulAction.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SemilinearMapClass.distribMulActionHomClass.{u1, u3, max (max u1 u4) u5, max (max (max u1 u4) u3) u5} R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (SemilinearEquivClass.instSemilinearMapClass.{u1, u1, u3, max (max u1 u4) u5, max (max (max u1 u4) u3) u5} R R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u1, u1, u3, max (max u1 u4) u5} R R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (Basis.repr.{max u4 u5, u1, u3} (Prod.{u4, u5} ι ι') R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6 (Basis.smul.{u1, u2, u3, u4, u5} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 ι ι' b c)) x) ij) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => R) _x) (Finsupp.funLike.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u4), succ u2, max (succ u1) (succ u4)} (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : S) => Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _x) (SMulHomClass.toFunLike.{max (max u1 u2) u4, u1, u2, max u1 u4} (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SMulZeroClass.toSMul.{u1, u2} R S (AddMonoid.toZero.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (DistribSMul.toSMulZeroClass.{u1, u2} R S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (DistribMulAction.toDistribSMul.{u1, u2} R S (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (Module.toDistribMulAction.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toSMul.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulActionHomClass.toSMulHomClass.{max (max u1 u2) u4, u1, u2, max u1 u4} (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4)) (Module.toDistribMulAction.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SemilinearMapClass.distribMulActionHomClass.{u1, u2, max u1 u4, max (max u1 u2) u4} R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (SemilinearEquivClass.instSemilinearMapClass.{u1, u1, u2, max u1 u4, max (max u1 u2) u4} R R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u1, u1, u2, max u1 u4} R R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (Basis.repr.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) b) (FunLike.coe.{max (succ u5) (succ u2), succ u5, succ u2} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) ι' (fun (_x : ι') => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι') => S) _x) (Finsupp.funLike.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (FunLike.coe.{max (max (succ u2) (succ u3)) (succ u5), succ u3, max (succ u2) (succ u5)} (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _x) (SMulHomClass.toFunLike.{max (max u2 u3) u5, u2, u3, max u2 u5} (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (SMulZeroClass.toSMul.{u2, u3} S A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribSMul.toSMulZeroClass.{u2, u3} S A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribMulAction.toDistribSMul.{u2, u3} S A (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (Module.toDistribMulAction.{u2, u3} S A _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddMonoid.toZero.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (DistribSMul.toSMulZeroClass.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddMonoid.toAddZeroClass.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (DistribMulAction.toDistribSMul.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (Module.toDistribMulAction.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_2 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)))))) (DistribMulActionHomClass.toSMulHomClass.{max (max u2 u3) u5, u2, u3, max u2 u5} (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (Module.toDistribMulAction.{u2, u3} S A _inst_2 _inst_3 _inst_5) (Module.toDistribMulAction.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_2 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) (SemilinearMapClass.distribMulActionHomClass.{u2, u3, max u2 u5, max (max u2 u3) u5} S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (SemilinearEquivClass.instSemilinearMapClass.{u2, u2, u3, max u2 u5, max (max u2 u3) u5} S S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) _inst_2 _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u2, u2, u3, max u2 u5} S S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_2 _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2)))))) (Basis.repr.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5 c) x) (Prod.snd.{u4, u5} ι ι' ij))) (Prod.fst.{u4, u5} ι ι' ij))
Case conversion may be inaccurate. Consider using '#align basis.smul_repr Basis.smul_reprₓ'. -/
@[simp]
theorem Basis.smul_repr {ι : Type v₁} {ι' : Type w₁} (b : Basis ι R S) (c : Basis ι' S A) (x ij) :
    (b.smul c).repr x ij = b.repr (c.repr x ij.2) ij.1 := by simp [Basis.smul]
#align basis.smul_repr Basis.smul_repr

/- warning: basis.smul_repr_mk -> Basis.smul_repr_mk is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} S] [_inst_3 : AddCommMonoid.{u3} A] [_inst_4 : Algebra.{u1, u2} R S _inst_1 _inst_2] [_inst_5 : Module.{u2, u3} S A _inst_2 _inst_3] [_inst_6 : Module.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u3} R S A (SMulZeroClass.toHasSmul.{u1, u2} R S (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R S (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R S (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (Module.toMulActionWithZero.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toHasSmul.{u2, u3} S A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (SMulWithZero.toSmulZeroClass.{u2, u3} S A (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (MulActionWithZero.toSMulWithZero.{u2, u3} S A (Semiring.toMonoidWithZero.{u2} S _inst_2) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (Module.toMulActionWithZero.{u2, u3} S A _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toHasSmul.{u1, u3} R A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (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 _inst_1))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3))) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))] {ι : Type.{u4}} {ι' : Type.{u5}} (b : Basis.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4)) (c : Basis.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5) (x : A) (i : ι) (j : ι'), Eq.{succ u1} R (coeFn.{max (succ (max u4 u5)) (succ u1), max (succ (max u4 u5)) (succ u1)} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (fun (_x : Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) => (Prod.{u4, u5} ι ι') -> R) (Finsupp.coeFun.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (coeFn.{max (succ u3) (succ (max (max u4 u5) u1)), max (succ u3) (succ (max (max u4 u5) u1))} (LinearEquiv.{u1, u1, u3, max (max u4 u5) u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (fun (_x : LinearEquiv.{u1, u1, u3, max (max u4 u5) u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) => A -> (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (LinearEquiv.hasCoeToFun.{u1, u1, u3, max (max u4 u5) u1} R R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (Basis.repr.{max u4 u5, u1, u3} (Prod.{u4, u5} ι ι') R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6 (Basis.smul.{u1, u2, u3, u4, u5} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 ι ι' b c)) x) (Prod.mk.{u4, u5} ι ι' i j)) (coeFn.{max (succ u4) (succ u1), max (succ u4) (succ u1)} (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (fun (_x : Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) => ι -> R) (Finsupp.coeFun.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (coeFn.{max (succ u2) (succ (max u4 u1)), max (succ u2) (succ (max u4 u1))} (LinearEquiv.{u1, u1, u2, max u4 u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (fun (_x : LinearEquiv.{u1, u1, u2, max u4 u1} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) => S -> (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (LinearEquiv.hasCoeToFun.{u1, u1, u2, max u4 u1} R R S (Finsupp.{u4, u1} ι R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (Basis.repr.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) b) (coeFn.{max (succ u5) (succ u2), max (succ u5) (succ u2)} (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (fun (_x : Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) => ι' -> S) (Finsupp.coeFun.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (coeFn.{max (succ u3) (succ (max u5 u2)), max (succ u3) (succ (max u5 u2))} (LinearEquiv.{u2, u2, u3, max u5 u2} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) (fun (_x : LinearEquiv.{u2, u2, u3, max u5 u2} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) => A -> (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (LinearEquiv.hasCoeToFun.{u2, u2, u3, max u5 u2} S S A (Finsupp.{u5, u2} ι' S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) _inst_2 _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2)) (Basis.repr.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5 c) x) j)) i)
but is expected to have type
  forall {R : Type.{u1}} {S : Type.{u2}} {A : Type.{u3}} [_inst_1 : CommSemiring.{u1} R] [_inst_2 : Semiring.{u2} S] [_inst_3 : AddCommMonoid.{u3} A] [_inst_4 : Algebra.{u1, u2} R S _inst_1 _inst_2] [_inst_5 : Module.{u2, u3} S A _inst_2 _inst_3] [_inst_6 : Module.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3] [_inst_7 : IsScalarTower.{u1, u2, u3} R S A (Algebra.toSMul.{u1, u2} R S _inst_1 _inst_2 _inst_4) (SMulZeroClass.toSMul.{u2, u3} S A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (SMulWithZero.toSMulZeroClass.{u2, u3} S A (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (MulActionWithZero.toSMulWithZero.{u2, u3} S A (Semiring.toMonoidWithZero.{u2} S _inst_2) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (Module.toMulActionWithZero.{u2, u3} S A _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u1, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (SMulWithZero.toSMulZeroClass.{u1, u3} R A (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R _inst_1)) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (MulActionWithZero.toSMulWithZero.{u1, u3} R A (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (Module.toMulActionWithZero.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6))))] {ι : Type.{u4}} {ι' : Type.{u5}} (b : Basis.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4)) (c : Basis.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5) (x : A) (i : ι) (j : ι'), Eq.{succ u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : Prod.{u4, u5} ι ι') => R) (Prod.mk.{u4, u5} ι ι' i j)) (FunLike.coe.{max (succ (max u4 u5)) (succ u1), succ (max u4 u5), succ u1} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Prod.{u4, u5} ι ι') (fun (_x : Prod.{u4, u5} ι ι') => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : Prod.{u4, u5} ι ι') => R) _x) (Finsupp.funLike.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (FunLike.coe.{max (max (max (succ u1) (succ u4)) (succ u3)) (succ u5), succ u3, max (max (succ u1) (succ u4)) (succ u5)} (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _x) (SMulHomClass.toFunLike.{max (max (max u1 u4) u3) u5, u1, u3, max (max u1 u4) u5} (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SMulZeroClass.toSMul.{u1, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribSMul.toSMulZeroClass.{u1, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribMulAction.toDistribSMul.{u1, u3} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (Module.toDistribMulAction.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6)))) (SMulZeroClass.toSMul.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribSMul.toSMulZeroClass.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulAction.toDistribSMul.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulActionHomClass.toSMulHomClass.{max (max (max u1 u4) u3) u5, u1, u3, max (max u1 u4) u5} (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (AddCommMonoid.toAddMonoid.{max (max u1 u4) u5} (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, u3} R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6) (Module.toDistribMulAction.{u1, max (max u1 u4) u5} R (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SemilinearMapClass.distribMulActionHomClass.{u1, u3, max (max u1 u4) u5, max (max (max u1 u4) u3) u5} R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (SemilinearEquivClass.instSemilinearMapClass.{u1, u1, u3, max (max u1 u4) u5, max (max (max u1 u4) u3) u5} R R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u3, max u1 u4 u5} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u1, u1, u3, max (max u1 u4) u5} R R A (Finsupp.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 (Finsupp.addCommMonoid.{max u4 u5, u1} (Prod.{u4, u5} ι ι') R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) _inst_6 (Finsupp.module.{max u4 u5, u1, u1} (Prod.{u4, u5} ι ι') R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (Basis.repr.{max u4 u5, u1, u3} (Prod.{u4, u5} ι ι') R A (CommSemiring.toSemiring.{u1} R _inst_1) _inst_3 _inst_6 (Basis.smul.{u1, u2, u3, u4, u5} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5 _inst_6 _inst_7 ι ι' b c)) x) (Prod.mk.{u4, u5} ι ι' i j)) (FunLike.coe.{max (succ u4) (succ u1), succ u4, succ u1} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) ι (fun (_x : ι) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι) => R) _x) (Finsupp.funLike.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u4), succ u2, max (succ u1) (succ u4)} (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : S) => Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) _x) (SMulHomClass.toFunLike.{max (max u1 u2) u4, u1, u2, max u1 u4} (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SMulZeroClass.toSMul.{u1, u2} R S (AddMonoid.toZero.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (DistribSMul.toSMulZeroClass.{u1, u2} R S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (DistribMulAction.toDistribSMul.{u1, u2} R S (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (Module.toDistribMulAction.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4))))) (SMulZeroClass.toSMul.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toZero.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribSMul.toSMulZeroClass.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddMonoid.toAddZeroClass.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulAction.toDistribSMul.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (DistribMulActionHomClass.toSMulHomClass.{max (max u1 u2) u4, u1, u2, max u1 u4} (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (AddCommMonoid.toAddMonoid.{max u1 u4} (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))))) (Module.toDistribMulAction.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4)) (Module.toDistribMulAction.{u1, max u1 u4} R (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (SemilinearMapClass.distribMulActionHomClass.{u1, u2, max u1 u4, max (max u1 u2) u4} R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (SemilinearEquivClass.instSemilinearMapClass.{u1, u1, u2, max u1 u4, max (max u1 u2) u4} R R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (LinearEquiv.{u1, u1, u2, max u1 u4} R R (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u1, u1, u2, max u1 u4} R R S (Finsupp.{u4, u1} ι R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (CommSemiring.toSemiring.{u1} R _inst_1) (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u4, u1} ι R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) (Finsupp.module.{u4, u1, u1} ι R R (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1)) (RingHomInvPair.ids.{u1} R (CommSemiring.toSemiring.{u1} R _inst_1))))))) (Basis.repr.{u4, u1, u2} ι R S (CommSemiring.toSemiring.{u1} R _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Algebra.toModule.{u1, u2} R S _inst_1 _inst_2 _inst_4) b) (FunLike.coe.{max (succ u5) (succ u2), succ u5, succ u2} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) ι' (fun (_x : ι') => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : ι') => S) _x) (Finsupp.funLike.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (FunLike.coe.{max (max (succ u2) (succ u3)) (succ u5), succ u3, max (succ u2) (succ u5)} (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _x) (SMulHomClass.toFunLike.{max (max u2 u3) u5, u2, u3, max u2 u5} (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (SMulZeroClass.toSMul.{u2, u3} S A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribSMul.toSMulZeroClass.{u2, u3} S A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A _inst_3)) (DistribMulAction.toDistribSMul.{u2, u3} S A (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (Module.toDistribMulAction.{u2, u3} S A _inst_2 _inst_3 _inst_5)))) (SMulZeroClass.toSMul.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddMonoid.toZero.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (DistribSMul.toSMulZeroClass.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddMonoid.toAddZeroClass.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))))) (DistribMulAction.toDistribSMul.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (Module.toDistribMulAction.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_2 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)))))) (DistribMulActionHomClass.toSMulHomClass.{max (max u2 u3) u5, u2, u3, max u2 u5} (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2)) (AddCommMonoid.toAddMonoid.{u3} A _inst_3) (AddCommMonoid.toAddMonoid.{max u2 u5} (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))))) (Module.toDistribMulAction.{u2, u3} S A _inst_2 _inst_3 _inst_5) (Module.toDistribMulAction.{u2, max u2 u5} S (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_2 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) (SemilinearMapClass.distribMulActionHomClass.{u2, u3, max u2 u5, max (max u2 u3) u5} S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (SemilinearEquivClass.instSemilinearMapClass.{u2, u2, u3, max u2 u5, max (max u2 u3) u5} S S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) (LinearEquiv.{u2, u2, u3, max u2 u5} S S _inst_2 _inst_2 (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2))) _inst_2 _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2) (LinearEquiv.instSemilinearEquivClassLinearEquiv.{u2, u2, u3, max u2 u5} S S A (Finsupp.{u5, u2} ι' S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_2))) _inst_2 _inst_2 _inst_3 (Finsupp.addCommMonoid.{u5, u2} ι' S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)))) _inst_5 (Finsupp.module.{u5, u2, u2} ι' S S _inst_2 (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2))) (Semiring.toModule.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHom.id.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_2)) (RingHomInvPair.ids.{u2} S _inst_2) (RingHomInvPair.ids.{u2} S _inst_2)))))) (Basis.repr.{u5, u2, u3} ι' S A _inst_2 _inst_3 _inst_5 c) x) j)) i)
Case conversion may be inaccurate. Consider using '#align basis.smul_repr_mk Basis.smul_repr_mkₓ'. -/
theorem Basis.smul_repr_mk {ι : Type v₁} {ι' : Type w₁} (b : Basis ι R S) (c : Basis ι' S A)
    (x i j) : (b.smul c).repr x (i, j) = b.repr (c.repr x j) i :=
  b.smul_repr c x (i, j)
#align basis.smul_repr_mk Basis.smul_repr_mk

#print Basis.smul_apply /-
@[simp]
theorem Basis.smul_apply {ι : Type v₁} {ι' : Type w₁} (b : Basis ι R S) (c : Basis ι' S A) (ij) :
    (b.smul c) ij = b ij.1 • c ij.2 := by
  obtain ⟨i, j⟩ := ij
  rw [Basis.apply_eq_iff]
  ext ⟨i', j'⟩
  rw [Basis.smul_repr, LinearEquiv.map_smul, Basis.repr_self, Finsupp.smul_apply,
    Finsupp.single_apply]
  dsimp only
  split_ifs with hi
  · simp [hi, Finsupp.single_apply]
  · simp [hi]
#align basis.smul_apply Basis.smul_apply
-/

end Semiring

section Ring

variable {R S}

variable [CommRing R] [Ring S] [Algebra R S]

/- warning: basis.algebra_map_injective -> Basis.algebraMap_injective is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : Ring.{u2} S] [_inst_3 : Algebra.{u1, u2} R S (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} S _inst_2)] {ι : Type.{u3}} [_inst_4 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (Ring.toDistrib.{u1} R (CommRing.toRing.{u1} R _inst_1))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))] [_inst_5 : Nontrivial.{u2} S], (Basis.{u3, u1, u2} ι R S (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u2} S (NonUnitalNonAssocRing.toAddCommGroup.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S _inst_2)))) (Algebra.toModule.{u1, u2} R S (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} S _inst_2) _inst_3)) -> (Function.Injective.{succ u1, succ u2} R S (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} S (Ring.toSemiring.{u2} S _inst_2))) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} S (Ring.toSemiring.{u2} S _inst_2))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u2} S (Ring.toSemiring.{u2} S _inst_2))) (algebraMap.{u1, u2} R S (CommRing.toCommSemiring.{u1} R _inst_1) (Ring.toSemiring.{u2} S _inst_2) _inst_3)))
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} [_inst_1 : CommRing.{u2} R] [_inst_2 : Ring.{u3} S] [_inst_3 : Algebra.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S _inst_2)] {ι : Type.{u1}} [_inst_4 : NoZeroDivisors.{u2} R (NonUnitalNonAssocRing.toMul.{u2} R (NonAssocRing.toNonUnitalNonAssocRing.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_1)))) (CommMonoidWithZero.toZero.{u2} R (CommSemiring.toCommMonoidWithZero.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))] [_inst_5 : Nontrivial.{u3} S], (Basis.{u1, u2, u3} ι R S (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2)))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S _inst_2) _inst_3)) -> (Function.Injective.{succ u2, succ u3} R S (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (RingHom.{u2, u3} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u2 u3, u2, u3} (RingHom.{u2, u3} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2))) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2)))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u2, u3} (RingHom.{u2, u3} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u2, u3} (RingHom.{u2, u3} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2))) R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2)) (RingHom.instRingHomClassRingHom.{u2, u3} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S _inst_2)))))) (algebraMap.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S _inst_2) _inst_3)))
Case conversion may be inaccurate. Consider using '#align basis.algebra_map_injective Basis.algebraMap_injectiveₓ'. -/
theorem Basis.algebraMap_injective {ι : Type _} [NoZeroDivisors R] [Nontrivial S]
    (b : Basis ι R S) : Function.Injective (algebraMap R S) :=
  have : NoZeroSMulDivisors R S := b.NoZeroSMulDivisors
  NoZeroSMulDivisors.algebraMap_injective R S
#align basis.algebra_map_injective Basis.algebraMap_injective

end Ring

section AlgHomTower

variable {A} {C D : Type _} [CommSemiring A] [CommSemiring C] [CommSemiring D] [Algebra A C]
  [Algebra A D]

variable (f : C →ₐ[A] D) (B) [CommSemiring B] [Algebra A B] [Algebra B C] [IsScalarTower A B C]

#print AlgHom.restrictDomain /-
/-- Restrict the domain of an `alg_hom`. -/
def AlgHom.restrictDomain : B →ₐ[A] D :=
  f.comp (IsScalarTower.toAlgHom A B C)
#align alg_hom.restrict_domain AlgHom.restrictDomain
-/

#print AlgHom.extendScalars /-
/-- Extend the scalars of an `alg_hom`. -/
def AlgHom.extendScalars : @AlgHom B C D _ _ _ _ (f.restrictDomain B).toRingHom.toAlgebra :=
  { f with commutes' := fun _ => rfl }
#align alg_hom.extend_scalars AlgHom.extendScalars
-/

variable {B}

#print algHomEquivSigma /-
/-- `alg_hom`s from the top of a tower are equivalent to a pair of `alg_hom`s. -/
def algHomEquivSigma : (C →ₐ[A] D) ≃ Σf : B →ₐ[A] D, @AlgHom B C D _ _ _ _ f.toRingHom.toAlgebra
    where
  toFun f := ⟨f.restrictDomain B, f.extendScalars B⟩
  invFun fg :=
    let alg := fg.1.toRingHom.toAlgebra
    fg.2.restrictScalars A
  left_inv f := by
    dsimp only
    ext
    rfl
  right_inv := by
    rintro ⟨⟨f, _, _, _, _, _⟩, g, _, _, _, _, hg⟩
    obtain rfl : f = fun x => g (algebraMap B C x) :=
      by
      ext
      exact (hg x).symm
    rfl
#align alg_hom_equiv_sigma algHomEquivSigma
-/

end AlgHomTower