l3lab/ntp-mathlib huggingface dataset:
/-- Any nontrivial noetherian ring satisfies the strong rank condition.

An injective map `((Fin n ⊕ Fin (1 + m)) → R) →ₗ[R] (Fin n → R)` for some left-noetherian `R`
would force `Fin (1 + m) → R ≃ₗ PUnit` (via `IsNoetherian.equivPUnitOfProdInjective`),
which is not the case!
-/
instance (priority := 100) IsNoetherianRing.strongRankCondition : StrongRankCondition R := by
  constructor
  intro m n f i
  by_contra h
  rw [not_le, ← Nat.add_one_le_iff, le_iff_exists_add] at h
  obtain ⟨m, rfl⟩ := h
  let e : Fin (n + 1 + m) ≃ Sum (Fin n) (Fin (1 + m)) :=
    (finCongr (add_assoc _ _ _)).trans finSumFinEquiv.symm
  let f' :=
    f.comp
      ((LinearEquiv.sumArrowLequivProdArrow _ _ R R).symm.trans
          (LinearEquiv.funCongrLeft R R e)).toLinearMap
  

Proof state:
case le_of_fin_injective.intro
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : IsNoetherianRing R
n m : ℕ
f : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R
i : Injective ⇑f
e : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm
f' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=
  f ∘ₗ
    ↑(LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R) ≪≫ₗ
        LinearEquiv.funCongrLeft R R e)
⊢ False

Next tactic:
have i' : Injective f' := i.comp (LinearEquiv.injective _)
/-- Any nontrivial noetherian ring satisfies the strong rank condition.

An injective map `((Fin n ⊕ Fin (1 + m)) → R) →ₗ[R] (Fin n → R)` for some left-noetherian `R`
would force `Fin (1 + m) → R ≃ₗ PUnit` (via `IsNoetherian.equivPUnitOfProdInjective`),
which is not the case!
-/
instance (priority := 100) IsNoetherianRing.strongRankCondition : StrongRankCondition R := by
  constructor
  intro m n f i
  by_contra h
  rw [not_le, ← Nat.add_one_le_iff, le_iff_exists_add] at h
  obtain ⟨m, rfl⟩ := h
  let e : Fin (n + 1 + m) ≃ Sum (Fin n) (Fin (1 + m)) :=
    (finCongr (add_assoc _ _ _)).trans finSumFinEquiv.symm
  let f' :=
    f.comp
      ((LinearEquiv.sumArrowLequivProdArrow _ _ R R).symm.trans
          (LinearEquiv.funCongrLeft R R e)).toLinearMap
  have i' : Injective f' := i.comp (LinearEquiv.injective _)
  

Proof state:
case le_of_fin_injective.intro
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : IsNoetherianRing R
n m : ℕ
f : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R
i : Injective ⇑f
e : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm
f' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=
  f ∘ₗ
    ↑(LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R) ≪≫ₗ
        LinearEquiv.funCongrLeft R R e)
i' : Injective ⇑f'
⊢ False

Next tactic:
apply @zero_ne_one (Fin (1 + m) → R) _ _
/-- Any nontrivial noetherian ring satisfies the strong rank condition.

An injective map `((Fin n ⊕ Fin (1 + m)) → R) →ₗ[R] (Fin n → R)` for some left-noetherian `R`
would force `Fin (1 + m) → R ≃ₗ PUnit` (via `IsNoetherian.equivPUnitOfProdInjective`),
which is not the case!
-/
instance (priority := 100) IsNoetherianRing.strongRankCondition : StrongRankCondition R := by
  constructor
  intro m n f i
  by_contra h
  rw [not_le, ← Nat.add_one_le_iff, le_iff_exists_add] at h
  obtain ⟨m, rfl⟩ := h
  let e : Fin (n + 1 + m) ≃ Sum (Fin n) (Fin (1 + m)) :=
    (finCongr (add_assoc _ _ _)).trans finSumFinEquiv.symm
  let f' :=
    f.comp
      ((LinearEquiv.sumArrowLequivProdArrow _ _ R R).symm.trans
          (LinearEquiv.funCongrLeft R R e)).toLinearMap
  have i' : Injective f' := i.comp (LinearEquiv.injective _)
  apply @zero_ne_one (Fin (1 + m) → R) _ _
  

Proof state:
case le_of_fin_injective.intro.a
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : IsNoetherianRing R
n m : ℕ
f : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R
i : Injective ⇑f
e : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm
f' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=
  f ∘ₗ
    ↑(LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R) ≪≫ₗ
        LinearEquiv.funCongrLeft R R e)
i' : Injective ⇑f'
⊢ 0 = 1

Next tactic:
apply (IsNoetherian.equivPUnitOfProdInjective f' i').injective
/-- Any nontrivial noetherian ring satisfies the strong rank condition.

An injective map `((Fin n ⊕ Fin (1 + m)) → R) →ₗ[R] (Fin n → R)` for some left-noetherian `R`
would force `Fin (1 + m) → R ≃ₗ PUnit` (via `IsNoetherian.equivPUnitOfProdInjective`),
which is not the case!
-/
instance (priority := 100) IsNoetherianRing.strongRankCondition : StrongRankCondition R := by
  constructor
  intro m n f i
  by_contra h
  rw [not_le, ← Nat.add_one_le_iff, le_iff_exists_add] at h
  obtain ⟨m, rfl⟩ := h
  let e : Fin (n + 1 + m) ≃ Sum (Fin n) (Fin (1 + m)) :=
    (finCongr (add_assoc _ _ _)).trans finSumFinEquiv.symm
  let f' :=
    f.comp
      ((LinearEquiv.sumArrowLequivProdArrow _ _ R R).symm.trans
          (LinearEquiv.funCongrLeft R R e)).toLinearMap
  have i' : Injective f' := i.comp (LinearEquiv.injective _)
  apply @zero_ne_one (Fin (1 + m) → R) _ _
  apply (IsNoetherian.equivPUnitOfProdInjective f' i').injective
  

Proof state:
case le_of_fin_injective.intro.a.a
R : Type u
inst✝² : Ring R
inst✝¹ : Nontrivial R
inst✝ : IsNoetherianRing R
n m : ℕ
f : (Fin (n + 1 + m) → R) →ₗ[R] Fin n → R
i : Injective ⇑f
e : Fin (n + 1 + m) ≃ Fin n ⊕ Fin (1 + m) := (finCongr (_ : n + 1 + m = n + (1 + m))).trans finSumFinEquiv.symm
f' : (Fin n → R) × (Fin (1 + m) → R) →ₗ[R] Fin n → R :=
  f ∘ₗ
    ↑(LinearEquiv.symm (LinearEquiv.sumArrowLequivProdArrow (Fin n) (Fin (1 + m)) R R) ≪≫ₗ
        LinearEquiv.funCongrLeft R R e)
i' : Injective ⇑f'
⊢ (IsNoetherian.equivPUnitOfProdInjective f' i') 0 = (IsNoetherian.equivPUnitOfProdInjective f' i') 1

Next tactic:
ext
/-- An `R`-linear map `R^n → R^m` induces a function `R^n/I^n → R^m/I^m`. -/
private def induced_map (I : Ideal R) (e : (ι → R) →ₗ[R] ι' → R) :
    (ι → R) ⧸ I.pi ι → (ι' → R) ⧸ I.pi ι' := fun x =>
  Quotient.liftOn' x (fun y => Ideal.Quotient.mk (I.pi ι') (e y))
    (by
      

Proof state:
R : Type u
inst✝¹ : CommRing R
I✝ : Ideal R
ι : Type v
inst✝ : Fintype ι
ι' : Type w
I : Ideal R
e : (ι → R) →ₗ[R] ι' → R
x : (ι → R) ⧸ Ideal.pi I ι
⊢ ∀ (a b : ι → R),
    Setoid.r a b →
      (fun y => (Ideal.Quotient.mk (Ideal.pi I ι')) (e y)) a = (fun y => (Ideal.Quotient.mk (Ideal.pi I ι')) (e y)) b

Next tactic:
refine' fun a b hab => Ideal.Quotient.eq.2 fun h => _
/-- An `R`-linear map `R^n → R^m` induces a function `R^n/I^n → R^m/I^m`. -/
private def induced_map (I : Ideal R) (e : (ι → R) →ₗ[R] ι' → R) :
    (ι → R) ⧸ I.pi ι → (ι' → R) ⧸ I.pi ι' := fun x =>
  Quotient.liftOn' x (fun y => Ideal.Quotient.mk (I.pi ι') (e y))
    (by
      refine' fun a b hab => Ideal.Quotient.eq.2 fun h => _
      

Proof state:
R : Type u
inst✝¹ : CommRing R
I✝ : Ideal R
ι : Type v
inst✝ : Fintype ι
ι' : Type w
I : Ideal R
e : (ι → R) →ₗ[R] ι' → R
x : (ι → R) ⧸ Ideal.pi I ι
a b : ι → R
hab : Setoid.r a b
h : ι'
⊢ (e a - e b) h ∈ I

Next tactic:
rw [Submodule.quotientRel_r_def] at hab
/-- An `R`-linear map `R^n → R^m` induces a function `R^n/I^n → R^m/I^m`. -/
private def induced_map (I : Ideal R) (e : (ι → R) →ₗ[R] ι' → R) :
    (ι → R) ⧸ I.pi ι → (ι' → R) ⧸ I.pi ι' := fun x =>
  Quotient.liftOn' x (fun y => Ideal.Quotient.mk (I.pi ι') (e y))
    (by
      refine' fun a b hab => Ideal.Quotient.eq.2 fun h => _
      rw [Submodule.quotientRel_r_def] at hab
      

Proof state:
R : Type u
inst✝¹ : CommRing R
I✝ : Ideal R
ι : Type v
inst✝ : Fintype ι
ι' : Type w
I : Ideal R
e : (ι → R) →ₗ[R] ι' → R
x : (ι → R) ⧸ Ideal.pi I ι
a b : ι → R
hab : a - b ∈ Ideal.pi I ι
h : ι'
⊢ (e a - e b) h ∈ I

Next tactic:
rw [← LinearMap.map_sub]
/-- An `R`-linear map `R^n → R^m` induces a function `R^n/I^n → R^m/I^m`. -/
private def induced_map (I : Ideal R) (e : (ι → R) →ₗ[R] ι' → R) :
    (ι → R) ⧸ I.pi ι → (ι' → R) ⧸ I.pi ι' := fun x =>
  Quotient.liftOn' x (fun y => Ideal.Quotient.mk (I.pi ι') (e y))
    (by
      refine' fun a b hab => Ideal.Quotient.eq.2 fun h => _
      rw [Submodule.quotientRel_r_def] at hab
      rw [← LinearMap.map_sub]
      

Proof state:
R : Type u
inst✝¹ : CommRing R
I✝ : Ideal R
ι : Type v
inst✝ : Fintype ι
ι' : Type w
I : Ideal R
e : (ι → R) →ₗ[R] ι' → R
x : (ι → R) ⧸ Ideal.pi I ι
a b : ι → R
hab : a - b ∈ Ideal.pi I ι
h : ι'
⊢ e (a - b) h ∈ I

Next tactic:
exact Ideal.map_pi _ _ hab e h
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  

Proof state:
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ((ι → R) ⧸ Ideal.pi I ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ Ideal.pi I ι'

Next tactic:
refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  

Proof state:
case refine'_1
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ∀ (x y : (ι → R) ⧸ Ideal.pi I ι), induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y
case refine'_2
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
    AddHom.toFun { toFun := induced_map I ↑e, map_add' := ?refine'_1 } (r • x) =
      (RingHom.id (R ⧸ I)) r • AddHom.toFun { toFun := induced_map I ↑e, map_add' := ?refine'_1 } x
case refine'_3
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))
    { toAddHom := { toFun := induced_map I ↑e, map_add' := ?refine'_1 }, map_smul' := ?refine'_2 }.toAddHom.toFun
case refine'_4
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))
    { toAddHom := { toFun := induced_map I ↑e, map_add' := ?refine'_1 }, map_smul' := ?refine'_2 }.toAddHom.toFun

Next tactic:
all_goals
    first |rintro ⟨a⟩ ⟨b⟩|rintro ⟨a⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    

Proof state:
case refine'_1
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ∀ (x y : (ι → R) ⧸ Ideal.pi I ι), induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y

Next tactic:
first |rintro ⟨a⟩ ⟨b⟩|rintro ⟨a⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    first |

Proof state:
case refine'_1
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ∀ (x y : (ι → R) ⧸ Ideal.pi I ι), induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y

Next tactic:
rintro ⟨a⟩ ⟨b⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    

Proof state:
case refine'_2
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
    AddHom.toFun
        { toFun := induced_map I ↑e,
          map_add' :=
            (_ :
              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
        (r • x) =
      (RingHom.id (R ⧸ I)) r •
        AddHom.toFun
          { toFun := induced_map I ↑e,
            map_add' :=
              (_ :
                ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                  induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
          x

Next tactic:
first |rintro ⟨a⟩ ⟨b⟩|rintro ⟨a⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    first |

Proof state:
case refine'_2
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
    AddHom.toFun
        { toFun := induced_map I ↑e,
          map_add' :=
            (_ :
              ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
        (r • x) =
      (RingHom.id (R ⧸ I)) r •
        AddHom.toFun
          { toFun := induced_map I ↑e,
            map_add' :=
              (_ :
                ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                  induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
          x

Next tactic:
rintro ⟨a⟩ ⟨b⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    

Proof state:
case refine'_3
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))
    {
          toAddHom :=
            { toFun := induced_map I ↑e,
              map_add' :=
                (_ :
                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },
          map_smul' :=
            (_ :
              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
                AddHom.toFun
                    { toFun := induced_map I ↑e,
                      map_add' :=
                        (_ :
                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                    (r • x) =
                  (RingHom.id (R ⧸ I)) r •
                    AddHom.toFun
                      { toFun := induced_map I ↑e,
                        map_add' :=
                          (_ :
                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                      x) }.toAddHom.toFun

Next tactic:
first |rintro ⟨a⟩ ⟨b⟩|rintro ⟨a⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    first |

Proof state:
case refine'_3
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))
    {
          toAddHom :=
            { toFun := induced_map I ↑e,
              map_add' :=
                (_ :
                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },
          map_smul' :=
            (_ :
              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
                AddHom.toFun
                    { toFun := induced_map I ↑e,
                      map_add' :=
                        (_ :
                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                    (r • x) =
                  (RingHom.id (R ⧸ I)) r •
                    AddHom.toFun
                      { toFun := induced_map I ↑e,
                        map_add' :=
                          (_ :
                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                      x) }.toAddHom.toFun

Next tactic:
rintro ⟨a⟩ ⟨b⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    first |rintro ⟨a⟩ ⟨b⟩|

Proof state:
case refine'_3
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ LeftInverse (induced_map I ↑(LinearEquiv.symm e))
    {
          toAddHom :=
            { toFun := induced_map I ↑e,
              map_add' :=
                (_ :
                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },
          map_smul' :=
            (_ :
              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
                AddHom.toFun
                    { toFun := induced_map I ↑e,
                      map_add' :=
                        (_ :
                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                    (r • x) =
                  (RingHom.id (R ⧸ I)) r •
                    AddHom.toFun
                      { toFun := induced_map I ↑e,
                        map_add' :=
                          (_ :
                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                      x) }.toAddHom.toFun

Next tactic:
rintro ⟨a⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    

Proof state:
case refine'_4
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))
    {
          toAddHom :=
            { toFun := induced_map I ↑e,
              map_add' :=
                (_ :
                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },
          map_smul' :=
            (_ :
              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
                AddHom.toFun
                    { toFun := induced_map I ↑e,
                      map_add' :=
                        (_ :
                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                    (r • x) =
                  (RingHom.id (R ⧸ I)) r •
                    AddHom.toFun
                      { toFun := induced_map I ↑e,
                        map_add' :=
                          (_ :
                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                      x) }.toAddHom.toFun

Next tactic:
first |rintro ⟨a⟩ ⟨b⟩|rintro ⟨a⟩
/-- An isomorphism of `R`-modules `R^n ≃ R^m` induces an isomorphism of `R/I`-modules
    `R^n/I^n ≃ R^m/I^m`. -/
private def induced_equiv [Fintype ι'] (I : Ideal R) (e : (ι → R) ≃ₗ[R] ι' → R) :
    ((ι → R) ⧸ I.pi ι) ≃ₗ[R ⧸ I] (ι' → R) ⧸ I.pi ι' := by
  refine'
    { toFun := induced_map I e
      invFun := induced_map I e.symm.. }
  all_goals
    first |

Proof state:
case refine'_4
R : Type u
inst✝² : CommRing R
I✝ : Ideal R
ι : Type v
inst✝¹ : Fintype ι
ι' : Type w
inst✝ : Fintype ι'
I : Ideal R
e : (ι → R) ≃ₗ[R] ι' → R
⊢ Function.RightInverse (induced_map I ↑(LinearEquiv.symm e))
    {
          toAddHom :=
            { toFun := induced_map I ↑e,
              map_add' :=
                (_ :
                  ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                    induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) },
          map_smul' :=
            (_ :
              ∀ (r : R ⧸ I) (x : (ι → R) ⧸ Ideal.pi I ι),
                AddHom.toFun
                    { toFun := induced_map I ↑e,
                      map_add' :=
                        (_ :
                          ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                            induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                    (r • x) =
                  (RingHom.id (R ⧸ I)) r •
                    AddHom.toFun
                      { toFun := induced_map I ↑e,
                        map_add' :=
                          (_ :
                            ∀ (x y : (ι → R) ⧸ Ideal.pi I ι),
                              induced_map I (↑e) (x + y) = induced_map I (↑e) x + induced_map I (↑e) y) }
                      x) }.toAddHom.toFun

Next tactic:
rintro ⟨a⟩ ⟨b⟩