l3lab/ntp-mathlib huggingface dataset:
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; 

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
x✝¹ y✝ : A →+ B
x✝ : A
⊢ (AddMonoidHom.toNatLinearMap (x✝¹ + y✝)) x✝ = (AddMonoidHom.toNatLinearMap x✝¹ + AddMonoidHom.toNatLinearMap y✝) x✝

Next tactic:
rfl
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
⊢ ∀ (r : R) (x : A →+ B),
    AddHom.toFun
        { toFun := AddMonoidHom.toNatLinearMap,
          map_add' :=
            (_ :
              ∀ (x y : A →+ B),
                AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
        (r • x) =
      (RingHom.id R) r •
        AddHom.toFun
          { toFun := AddMonoidHom.toNatLinearMap,
            map_add' :=
              (_ :
                ∀ (x y : A →+ B),
                  AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
          x

Next tactic:
intros
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
r✝ : R
x✝ : A →+ B
⊢ AddHom.toFun
      { toFun := AddMonoidHom.toNatLinearMap,
        map_add' :=
          (_ :
            ∀ (x y : A →+ B),
              AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
      (r✝ • x✝) =
    (RingHom.id R) r✝ •
      AddHom.toFun
        { toFun := AddMonoidHom.toNatLinearMap,
          map_add' :=
            (_ :
              ∀ (x y : A →+ B),
                AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
        x✝

Next tactic:
ext
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; 

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
r✝ : R
x✝¹ : A →+ B
x✝ : A
⊢ (AddHom.toFun
        { toFun := AddMonoidHom.toNatLinearMap,
          map_add' :=
            (_ :
              ∀ (x y : A →+ B),
                AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
        (r✝ • x✝¹))
      x✝ =
    ((RingHom.id R) r✝ •
        AddHom.toFun
          { toFun := AddMonoidHom.toNatLinearMap,
            map_add' :=
              (_ :
                ∀ (x y : A →+ B),
                  AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
          x✝¹)
      x✝

Next tactic:
rfl
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; rfl
  left_inv := by 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
⊢ LeftInverse LinearMap.toAddMonoidHom
    {
          toAddHom :=
            { toFun := AddMonoidHom.toNatLinearMap,
              map_add' :=
                (_ :
                  ∀ (x y : A →+ B),
                    AddMonoidHom.toNatLinearMap (x + y) =
                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },
          map_smul' :=
            (_ :
              ∀ (r : R) (x : A →+ B),
                AddHom.toFun
                    { toFun := AddMonoidHom.toNatLinearMap,
                      map_add' :=
                        (_ :
                          ∀ (x y : A →+ B),
                            AddMonoidHom.toNatLinearMap (x + y) =
                              AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                    (r • x) =
                  (RingHom.id R) r •
                    AddHom.toFun
                      { toFun := AddMonoidHom.toNatLinearMap,
                        map_add' :=
                          (_ :
                            ∀ (x y : A →+ B),
                              AddMonoidHom.toNatLinearMap (x + y) =
                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                      x) }.toAddHom.toFun

Next tactic:
intro f
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; rfl
  left_inv := by intro f; 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
f : A →+ B
⊢ LinearMap.toAddMonoidHom
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := AddMonoidHom.toNatLinearMap,
                map_add' :=
                  (_ :
                    ∀ (x y : A →+ B),
                      AddMonoidHom.toNatLinearMap (x + y) =
                        AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },
            map_smul' :=
              (_ :
                ∀ (r : R) (x : A →+ B),
                  AddHom.toFun
                      { toFun := AddMonoidHom.toNatLinearMap,
                        map_add' :=
                          (_ :
                            ∀ (x y : A →+ B),
                              AddMonoidHom.toNatLinearMap (x + y) =
                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                      (r • x) =
                    (RingHom.id R) r •
                      AddHom.toFun
                        { toFun := AddMonoidHom.toNatLinearMap,
                          map_add' :=
                            (_ :
                              ∀ (x y : A →+ B),
                                AddMonoidHom.toNatLinearMap (x + y) =
                                  AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                        x) }.toAddHom
        f) =
    f

Next tactic:
ext
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; rfl
  left_inv := by intro f; ext; 

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
f : A →+ B
x✝ : A
⊢ (LinearMap.toAddMonoidHom
        (AddHom.toFun
          {
              toAddHom :=
                { toFun := AddMonoidHom.toNatLinearMap,
                  map_add' :=
                    (_ :
                      ∀ (x y : A →+ B),
                        AddMonoidHom.toNatLinearMap (x + y) =
                          AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : A →+ B),
                    AddHom.toFun
                        { toFun := AddMonoidHom.toNatLinearMap,
                          map_add' :=
                            (_ :
                              ∀ (x y : A →+ B),
                                AddMonoidHom.toNatLinearMap (x + y) =
                                  AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                        (r • x) =
                      (RingHom.id R) r •
                        AddHom.toFun
                          { toFun := AddMonoidHom.toNatLinearMap,
                            map_add' :=
                              (_ :
                                ∀ (x y : A →+ B),
                                  AddMonoidHom.toNatLinearMap (x + y) =
                                    AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                          x) }.toAddHom
          f))
      x✝ =
    f x✝

Next tactic:
rfl
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; rfl
  left_inv := by intro f; ext; rfl
  right_inv := by 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
⊢ Function.RightInverse LinearMap.toAddMonoidHom
    {
          toAddHom :=
            { toFun := AddMonoidHom.toNatLinearMap,
              map_add' :=
                (_ :
                  ∀ (x y : A →+ B),
                    AddMonoidHom.toNatLinearMap (x + y) =
                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },
          map_smul' :=
            (_ :
              ∀ (r : R) (x : A →+ B),
                AddHom.toFun
                    { toFun := AddMonoidHom.toNatLinearMap,
                      map_add' :=
                        (_ :
                          ∀ (x y : A →+ B),
                            AddMonoidHom.toNatLinearMap (x + y) =
                              AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                    (r • x) =
                  (RingHom.id R) r •
                    AddHom.toFun
                      { toFun := AddMonoidHom.toNatLinearMap,
                        map_add' :=
                          (_ :
                            ∀ (x y : A →+ B),
                              AddMonoidHom.toNatLinearMap (x + y) =
                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                      x) }.toAddHom.toFun

Next tactic:
intro f
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; rfl
  left_inv := by intro f; ext; rfl
  right_inv := by intro f; 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
f : A →ₗ[ℕ] B
⊢ AddHom.toFun
      {
          toAddHom :=
            { toFun := AddMonoidHom.toNatLinearMap,
              map_add' :=
                (_ :
                  ∀ (x y : A →+ B),
                    AddMonoidHom.toNatLinearMap (x + y) =
                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },
          map_smul' :=
            (_ :
              ∀ (r : R) (x : A →+ B),
                AddHom.toFun
                    { toFun := AddMonoidHom.toNatLinearMap,
                      map_add' :=
                        (_ :
                          ∀ (x y : A →+ B),
                            AddMonoidHom.toNatLinearMap (x + y) =
                              AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                    (r • x) =
                  (RingHom.id R) r •
                    AddHom.toFun
                      { toFun := AddMonoidHom.toNatLinearMap,
                        map_add' :=
                          (_ :
                            ∀ (x y : A →+ B),
                              AddMonoidHom.toNatLinearMap (x + y) =
                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                      x) }.toAddHom
      (LinearMap.toAddMonoidHom f) =
    f

Next tactic:
ext
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B
    where
  toFun := AddMonoidHom.toNatLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; ext; rfl
  left_inv := by intro f; ext; rfl
  right_inv := by intro f; ext; 

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : Module R B
f : A →ₗ[ℕ] B
x✝ : A
⊢ (AddHom.toFun
        {
            toAddHom :=
              { toFun := AddMonoidHom.toNatLinearMap,
                map_add' :=
                  (_ :
                    ∀ (x y : A →+ B),
                      AddMonoidHom.toNatLinearMap (x + y) =
                        AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },
            map_smul' :=
              (_ :
                ∀ (r : R) (x : A →+ B),
                  AddHom.toFun
                      { toFun := AddMonoidHom.toNatLinearMap,
                        map_add' :=
                          (_ :
                            ∀ (x y : A →+ B),
                              AddMonoidHom.toNatLinearMap (x + y) =
                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                      (r • x) =
                    (RingHom.id R) r •
                      AddHom.toFun
                        { toFun := AddMonoidHom.toNatLinearMap,
                          map_add' :=
                            (_ :
                              ∀ (x y : A →+ B),
                                AddMonoidHom.toNatLinearMap (x + y) =
                                  AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }
                        x) }.toAddHom
        (LinearMap.toAddMonoidHom f))
      x✝ =
    f x✝

Next tactic:
rfl
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
    [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B
    where
  toFun := AddMonoidHom.toIntLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommGroup A
inst✝¹ : AddCommGroup B
inst✝ : Module R B
⊢ ∀ (x y : A →+ B), AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y

Next tactic:
intros
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
    [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B
    where
  toFun := AddMonoidHom.toIntLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommGroup A
inst✝¹ : AddCommGroup B
inst✝ : Module R B
x✝ y✝ : A →+ B
⊢ AddMonoidHom.toIntLinearMap (x✝ + y✝) = AddMonoidHom.toIntLinearMap x✝ + AddMonoidHom.toIntLinearMap y✝

Next tactic:
ext
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
    [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B
    where
  toFun := AddMonoidHom.toIntLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; 

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommGroup A
inst✝¹ : AddCommGroup B
inst✝ : Module R B
x✝¹ y✝ : A →+ B
x✝ : A
⊢ (AddMonoidHom.toIntLinearMap (x✝¹ + y✝)) x✝ = (AddMonoidHom.toIntLinearMap x✝¹ + AddMonoidHom.toIntLinearMap y✝) x✝

Next tactic:
rfl
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
    [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B
    where
  toFun := AddMonoidHom.toIntLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommGroup A
inst✝¹ : AddCommGroup B
inst✝ : Module R B
⊢ ∀ (r : R) (x : A →+ B),
    AddHom.toFun
        { toFun := AddMonoidHom.toIntLinearMap,
          map_add' :=
            (_ :
              ∀ (x y : A →+ B),
                AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }
        (r • x) =
      (RingHom.id R) r •
        AddHom.toFun
          { toFun := AddMonoidHom.toIntLinearMap,
            map_add' :=
              (_ :
                ∀ (x y : A →+ B),
                  AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }
          x

Next tactic:
intros
/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
    [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B
    where
  toFun := AddMonoidHom.toIntLinearMap
  invFun := LinearMap.toAddMonoidHom
  map_add' := by intros; ext; rfl
  map_smul' := by intros; 

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
A : Type u_20
B : Type u_21
R : Type u_22
inst✝³ : Semiring R
inst✝² : AddCommGroup A
inst✝¹ : AddCommGroup B
inst✝ : Module R B
r✝ : R
x✝ : A →+ B
⊢ AddHom.toFun
      { toFun := AddMonoidHom.toIntLinearMap,
        map_add' :=
          (_ :
            ∀ (x y : A →+ B),
              AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }
      (r✝ • x✝) =
    (RingHom.id R) r✝ •
      AddHom.toFun
        { toFun := AddMonoidHom.toIntLinearMap,
          map_add' :=
            (_ :
              ∀ (x y : A →+ B),
                AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }
        x✝

Next tactic:
ext