l3lab/ntp-mathlib huggingface dataset:
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`.
See `quotientToQuotientRangePowQuotSucc` for this as a linear map,
and `quotientRangePowQuotSuccInclusionEquiv` for this as a linear equivalence.
-/
noncomputable def quotientToQuotientRangePowQuotSuccAux {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) :=
  Quotient.map' (fun x : S => ⟨_, Ideal.mem_map_of_mem _ (Ideal.mul_mem_left _ x a_mem)⟩)
    fun x y h => by
    rw [Submodule.quotientRel_r_def] at h ⊢
    simp only [_root_.map_mul, LinearMap.mem_range]
    refine' ⟨⟨_, Ideal.mem_map_of_mem _ (Ideal.mul_mem_mul h a_mem)⟩, _⟩
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x y : S
h : x - y ∈ P
⊢ (powQuotSuccInclusion f p P i)
      { val := (Quotient.mk (P ^ e)) ((x - y) * a),
        property := (_ : (Quotient.mk (P ^ e)) ((x - y) * a) ∈ map (Quotient.mk (P ^ e)) (P ^ (i + 1))) } =
    { val := (Quotient.mk (P ^ e)) x * (Quotient.mk (P ^ e)) a,
        property :=
          (_ : (fun x => x ∈ map (Quotient.mk (P ^ e)) (P ^ i)) ((Quotient.mk (P ^ e)) x * (Quotient.mk (P ^ e)) a)) } -
      { val := (Quotient.mk (P ^ e)) y * (Quotient.mk (P ^ e)) a,
        property :=
          (_ : (fun x => x ∈ map (Quotient.mk (P ^ e)) (P ^ i)) ((Quotient.mk (P ^ e)) y * (Quotient.mk (P ^ e)) a)) }

Next tactic:
ext
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`.
See `quotientToQuotientRangePowQuotSucc` for this as a linear map,
and `quotientRangePowQuotSuccInclusionEquiv` for this as a linear equivalence.
-/
noncomputable def quotientToQuotientRangePowQuotSuccAux {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) :=
  Quotient.map' (fun x : S => ⟨_, Ideal.mem_map_of_mem _ (Ideal.mul_mem_left _ x a_mem)⟩)
    fun x y h => by
    rw [Submodule.quotientRel_r_def] at h ⊢
    simp only [_root_.map_mul, LinearMap.mem_range]
    refine' ⟨⟨_, Ideal.mem_map_of_mem _ (Ideal.mul_mem_mul h a_mem)⟩, _⟩
    ext
    

Proof state:
case a
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x y : S
h : x - y ∈ P
⊢ ↑((powQuotSuccInclusion f p P i)
        { val := (Quotient.mk (P ^ e)) ((x - y) * a),
          property := (_ : (Quotient.mk (P ^ e)) ((x - y) * a) ∈ map (Quotient.mk (P ^ e)) (P ^ (i + 1))) }) =
    ↑({ val := (Quotient.mk (P ^ e)) x * (Quotient.mk (P ^ e)) a,
          property :=
            (_ :
              (fun x => x ∈ map (Quotient.mk (P ^ e)) (P ^ i)) ((Quotient.mk (P ^ e)) x * (Quotient.mk (P ^ e)) a)) } -
        { val := (Quotient.mk (P ^ e)) y * (Quotient.mk (P ^ e)) a,
          property :=
            (_ :
              (fun x => x ∈ map (Quotient.mk (P ^ e)) (P ^ i)) ((Quotient.mk (P ^ e)) y * (Quotient.mk (P ^ e)) a)) })

Next tactic:
rw [powQuotSuccInclusion_apply_coe, Subtype.coe_mk, Submodule.coe_sub, Subtype.coe_mk,
      Subtype.coe_mk, _root_.map_mul, map_sub, sub_mul]
theorem quotientToQuotientRangePowQuotSuccAux_mk {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) (x : S) :
    quotientToQuotientRangePowQuotSuccAux f p P a_mem (Submodule.Quotient.mk x) =
      Submodule.Quotient.mk ⟨_, Ideal.mem_map_of_mem _ (Ideal.mul_mem_left _ x a_mem)⟩ :=
  by 

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x : S
⊢ quotientToQuotientRangePowQuotSuccAux f p P a_mem (Submodule.Quotient.mk x) =
    Submodule.Quotient.mk
      { val := (Quotient.mk (P ^ e)) (x * a),
        property := (_ : (Quotient.mk (P ^ e)) (x * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) }

Next tactic:
apply Quotient.map'_mk''
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
⊢ ∀ (x y : S ⧸ P),
    quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
      quotientToQuotientRangePowQuotSuccAux f p P a_mem x + quotientToQuotientRangePowQuotSuccAux f p P a_mem y

Next tactic:
intro x y
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; 

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x y : S ⧸ P
⊢ quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
    quotientToQuotientRangePowQuotSuccAux f p P a_mem x + quotientToQuotientRangePowQuotSuccAux f p P a_mem y

Next tactic:
refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x✝ y✝ : S ⧸ P
x y : S
⊢ quotientToQuotientRangePowQuotSuccAux f p P a_mem (Quotient.mk'' x + Quotient.mk'' y) =
    quotientToQuotientRangePowQuotSuccAux f p P a_mem (Quotient.mk'' x) +
      quotientToQuotientRangePowQuotSuccAux f p P a_mem (Quotient.mk'' y)

Next tactic:
simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x✝ y✝ : S ⧸ P
x y : S
⊢ Submodule.Quotient.mk
      { val := (Quotient.mk (P ^ e)) (x * a + y * a),
        property := (_ : (fun x => x ∈ map (Quotient.mk (P ^ e)) (P ^ i)) ((Quotient.mk (P ^ e)) (x * a + y * a))) } =
    Submodule.Quotient.mk
      ({ val := (Quotient.mk (P ^ e)) (x * a),
          property := (_ : (Quotient.mk (P ^ e)) (x * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) } +
        { val := (Quotient.mk (P ^ e)) (y * a),
          property := (_ : (Quotient.mk (P ^ e)) (y * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) })

Next tactic:
exact congr_arg Submodule.Quotient.mk rfl
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    exact congr_arg Submodule.Quotient.mk rfl
  map_smul' := by
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
⊢ ∀ (r : R ⧸ p) (x : S ⧸ P),
    AddHom.toFun
        { toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem,
          map_add' :=
            (_ :
              ∀ (x y : S ⧸ P),
                quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
                  quotientToQuotientRangePowQuotSuccAux f p P a_mem x +
                    quotientToQuotientRangePowQuotSuccAux f p P a_mem y) }
        (r • x) =
      (RingHom.id (R ⧸ p)) r •
        AddHom.toFun
          { toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem,
            map_add' :=
              (_ :
                ∀ (x y : S ⧸ P),
                  quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
                    quotientToQuotientRangePowQuotSuccAux f p P a_mem x +
                      quotientToQuotientRangePowQuotSuccAux f p P a_mem y) }
          x

Next tactic:
intro x y
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    exact congr_arg Submodule.Quotient.mk rfl
  map_smul' := by
    intro x y; 

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x : R ⧸ p
y : S ⧸ P
⊢ AddHom.toFun
      { toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem,
        map_add' :=
          (_ :
            ∀ (x y : S ⧸ P),
              quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
                quotientToQuotientRangePowQuotSuccAux f p P a_mem x +
                  quotientToQuotientRangePowQuotSuccAux f p P a_mem y) }
      (x • y) =
    (RingHom.id (R ⧸ p)) x •
      AddHom.toFun
        { toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem,
          map_add' :=
            (_ :
              ∀ (x y : S ⧸ P),
                quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
                  quotientToQuotientRangePowQuotSuccAux f p P a_mem x +
                    quotientToQuotientRangePowQuotSuccAux f p P a_mem y) }
        y

Next tactic:
refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    exact congr_arg Submodule.Quotient.mk rfl
  map_smul' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x✝ : R ⧸ p
y✝ : S ⧸ P
x : R
y : S
⊢ AddHom.toFun
      { toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem,
        map_add' :=
          (_ :
            ∀ (x y : S ⧸ P),
              quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
                quotientToQuotientRangePowQuotSuccAux f p P a_mem x +
                  quotientToQuotientRangePowQuotSuccAux f p P a_mem y) }
      (Quotient.mk'' x • Quotient.mk'' y) =
    (RingHom.id (R ⧸ p)) (Quotient.mk'' x) •
      AddHom.toFun
        { toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem,
          map_add' :=
            (_ :
              ∀ (x y : S ⧸ P),
                quotientToQuotientRangePowQuotSuccAux f p P a_mem (x + y) =
                  quotientToQuotientRangePowQuotSuccAux f p P a_mem x +
                    quotientToQuotientRangePowQuotSuccAux f p P a_mem y) }
        (Quotient.mk'' y)

Next tactic:
simp only [Submodule.Quotient.mk''_eq_mk, RingHom.id_apply,
      quotientToQuotientRangePowQuotSuccAux_mk]
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    exact congr_arg Submodule.Quotient.mk rfl
  map_smul' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, RingHom.id_apply,
      quotientToQuotientRangePowQuotSuccAux_mk]
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x✝ : R ⧸ p
y✝ : S ⧸ P
x : R
y : S
⊢ quotientToQuotientRangePowQuotSuccAux f p P a_mem (Submodule.Quotient.mk x • Submodule.Quotient.mk y) =
    Submodule.Quotient.mk x •
      Submodule.Quotient.mk
        { val := (Quotient.mk (P ^ e)) (y * a),
          property := (_ : (Quotient.mk (P ^ e)) (y * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) }

Next tactic:
refine congr_arg Submodule.Quotient.mk ?_
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    exact congr_arg Submodule.Quotient.mk rfl
  map_smul' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, RingHom.id_apply,
      quotientToQuotientRangePowQuotSuccAux_mk]
    refine congr_arg Submodule.Quotient.mk ?_
    

Proof state:
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x✝ : R ⧸ p
y✝ : S ⧸ P
x : R
y : S
⊢ (fun x =>
        { val := (Quotient.mk (P ^ e)) (x * a),
          property := (_ : (Quotient.mk (P ^ e)) (x * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) })
      ((fun x x_1 => x * x_1) (f x) y) =
    (fun x_1 => Submodule.Quotient.mk x • x_1)
      { val := (Quotient.mk (P ^ e)) (y * a),
        property := (_ : (Quotient.mk (P ^ e)) (y * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) }

Next tactic:
ext
/-- `S ⧸ P` embeds into the quotient by `P^(i+1) ⧸ P^e` as a subspace of `P^i ⧸ P^e`. -/
noncomputable def quotientToQuotientRangePowQuotSucc {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) :
    S ⧸ P →ₗ[R ⧸ p]
      (P ^ i).map (Ideal.Quotient.mk (P ^ e)) ⧸ LinearMap.range (powQuotSuccInclusion f p P i) where
  toFun := quotientToQuotientRangePowQuotSuccAux f p P a_mem
  map_add' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, ← Submodule.Quotient.mk_add,
      quotientToQuotientRangePowQuotSuccAux_mk, add_mul]
    exact congr_arg Submodule.Quotient.mk rfl
  map_smul' := by
    intro x y; refine' Quotient.inductionOn' x fun x => Quotient.inductionOn' y fun y => _
    simp only [Submodule.Quotient.mk''_eq_mk, RingHom.id_apply,
      quotientToQuotientRangePowQuotSuccAux_mk]
    refine congr_arg Submodule.Quotient.mk ?_
    ext
    

Proof state:
case a
R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
i : ℕ
a : S
a_mem : a ∈ P ^ i
x✝ : R ⧸ p
y✝ : S ⧸ P
x : R
y : S
⊢ ↑((fun x =>
          { val := (Quotient.mk (P ^ e)) (x * a),
            property := (_ : (Quotient.mk (P ^ e)) (x * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) })
        ((fun x x_1 => x * x_1) (f x) y)) =
    ↑((fun x_1 => Submodule.Quotient.mk x • x_1)
        { val := (Quotient.mk (P ^ e)) (y * a),
          property := (_ : (Quotient.mk (P ^ e)) (y * a) ∈ map (Quotient.mk (P ^ e)) (P ^ i)) })

Next tactic:
simp only [mul_assoc, _root_.map_mul, Quotient.mk_eq_mk, Submodule.coe_smul_of_tower,
      Algebra.smul_def, Quotient.algebraMap_quotient_pow_ramificationIdx]
theorem quotientToQuotientRangePowQuotSucc_injective [IsDomain S] [IsDedekindDomain S] [P.IsPrime]
    {i : ℕ} (hi : i < e) {a : S} (a_mem : a ∈ P ^ i) (a_not_mem : a ∉ P ^ (i + 1)) :
    Function.Injective (quotientToQuotientRangePowQuotSucc f p P a_mem) := fun x =>
  Quotient.inductionOn' x fun x y =>
    Quotient.inductionOn' y fun y h => by
      

Proof state:
R : Type u
inst✝⁴ : CommRing R
S : Type v
inst✝³ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
inst✝² : IsDomain S
inst✝¹ : IsDedekindDomain S
inst✝ : IsPrime P
i : ℕ
hi : i < e
a : S
a_mem : a ∈ P ^ i
a_not_mem : a ∉ P ^ (i + 1)
x✝ : S ⧸ P
x : S
y✝ : S ⧸ P
y : S
h :
  (quotientToQuotientRangePowQuotSucc f p P a_mem) (Quotient.mk'' x) =
    (quotientToQuotientRangePowQuotSucc f p P a_mem) (Quotient.mk'' y)
⊢ Quotient.mk'' x = Quotient.mk'' y

Next tactic:
have Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1) := Ideal.pow_le_pow_right hi
theorem quotientToQuotientRangePowQuotSucc_injective [IsDomain S] [IsDedekindDomain S] [P.IsPrime]
    {i : ℕ} (hi : i < e) {a : S} (a_mem : a ∈ P ^ i) (a_not_mem : a ∉ P ^ (i + 1)) :
    Function.Injective (quotientToQuotientRangePowQuotSucc f p P a_mem) := fun x =>
  Quotient.inductionOn' x fun x y =>
    Quotient.inductionOn' y fun y h => by
      have Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1) := Ideal.pow_le_pow_right hi
      

Proof state:
R : Type u
inst✝⁴ : CommRing R
S : Type v
inst✝³ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
inst✝² : IsDomain S
inst✝¹ : IsDedekindDomain S
inst✝ : IsPrime P
i : ℕ
hi : i < e
a : S
a_mem : a ∈ P ^ i
a_not_mem : a ∉ P ^ (i + 1)
x✝ : S ⧸ P
x : S
y✝ : S ⧸ P
y : S
h :
  (quotientToQuotientRangePowQuotSucc f p P a_mem) (Quotient.mk'' x) =
    (quotientToQuotientRangePowQuotSucc f p P a_mem) (Quotient.mk'' y)
Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1)
⊢ Quotient.mk'' x = Quotient.mk'' y

Next tactic:
simp only [Submodule.Quotient.mk''_eq_mk, quotientToQuotientRangePowQuotSucc_mk,
        Submodule.Quotient.eq, LinearMap.mem_range, Subtype.ext_iff, Subtype.coe_mk,
        Submodule.coe_sub] at h ⊢
theorem quotientToQuotientRangePowQuotSucc_injective [IsDomain S] [IsDedekindDomain S] [P.IsPrime]
    {i : ℕ} (hi : i < e) {a : S} (a_mem : a ∈ P ^ i) (a_not_mem : a ∉ P ^ (i + 1)) :
    Function.Injective (quotientToQuotientRangePowQuotSucc f p P a_mem) := fun x =>
  Quotient.inductionOn' x fun x y =>
    Quotient.inductionOn' y fun y h => by
      have Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1) := Ideal.pow_le_pow_right hi
      simp only [Submodule.Quotient.mk''_eq_mk, quotientToQuotientRangePowQuotSucc_mk,
        Submodule.Quotient.eq, LinearMap.mem_range, Subtype.ext_iff, Subtype.coe_mk,
        Submodule.coe_sub] at h ⊢
      

Proof state:
R : Type u
inst✝⁴ : CommRing R
S : Type v
inst✝³ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
inst✝² : IsDomain S
inst✝¹ : IsDedekindDomain S
inst✝ : IsPrime P
i : ℕ
hi : i < e
a : S
a_mem : a ∈ P ^ i
a_not_mem : a ∉ P ^ (i + 1)
x✝ : S ⧸ P
x : S
y✝ : S ⧸ P
y : S
Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1)
h : ∃ y_1, ↑((powQuotSuccInclusion f p P i) y_1) = (Quotient.mk (P ^ e)) (x * a) - (Quotient.mk (P ^ e)) (y * a)
⊢ x - y ∈ P

Next tactic:
rcases h with ⟨⟨⟨z⟩, hz⟩, h⟩
theorem quotientToQuotientRangePowQuotSucc_injective [IsDomain S] [IsDedekindDomain S] [P.IsPrime]
    {i : ℕ} (hi : i < e) {a : S} (a_mem : a ∈ P ^ i) (a_not_mem : a ∉ P ^ (i + 1)) :
    Function.Injective (quotientToQuotientRangePowQuotSucc f p P a_mem) := fun x =>
  Quotient.inductionOn' x fun x y =>
    Quotient.inductionOn' y fun y h => by
      have Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1) := Ideal.pow_le_pow_right hi
      simp only [Submodule.Quotient.mk''_eq_mk, quotientToQuotientRangePowQuotSucc_mk,
        Submodule.Quotient.eq, LinearMap.mem_range, Subtype.ext_iff, Subtype.coe_mk,
        Submodule.coe_sub] at h ⊢
      rcases h with ⟨⟨⟨z⟩, hz⟩, h⟩
      

Proof state:
case intro.mk.mk
R : Type u
inst✝⁴ : CommRing R
S : Type v
inst✝³ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
inst✝² : IsDomain S
inst✝¹ : IsDedekindDomain S
inst✝ : IsPrime P
i : ℕ
hi : i < e
a : S
a_mem : a ∈ P ^ i
a_not_mem : a ∉ P ^ (i + 1)
x✝ : S ⧸ P
x : S
y✝ : S ⧸ P
y : S
Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1)
val✝ : S ⧸ P ^ e
z : S
hz : Quot.mk Setoid.r z ∈ map (Quotient.mk (P ^ e)) (P ^ (i + 1))
h :
  ↑((powQuotSuccInclusion f p P i) { val := Quot.mk Setoid.r z, property := hz }) =
    (Quotient.mk (P ^ e)) (x * a) - (Quotient.mk (P ^ e)) (y * a)
⊢ x - y ∈ P

Next tactic:
rw [Submodule.Quotient.quot_mk_eq_mk, Ideal.Quotient.mk_eq_mk, Ideal.mem_quotient_iff_mem_sup,
        sup_eq_left.mpr Pe_le_Pi1] at hz
theorem quotientToQuotientRangePowQuotSucc_injective [IsDomain S] [IsDedekindDomain S] [P.IsPrime]
    {i : ℕ} (hi : i < e) {a : S} (a_mem : a ∈ P ^ i) (a_not_mem : a ∉ P ^ (i + 1)) :
    Function.Injective (quotientToQuotientRangePowQuotSucc f p P a_mem) := fun x =>
  Quotient.inductionOn' x fun x y =>
    Quotient.inductionOn' y fun y h => by
      have Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1) := Ideal.pow_le_pow_right hi
      simp only [Submodule.Quotient.mk''_eq_mk, quotientToQuotientRangePowQuotSucc_mk,
        Submodule.Quotient.eq, LinearMap.mem_range, Subtype.ext_iff, Subtype.coe_mk,
        Submodule.coe_sub] at h ⊢
      rcases h with ⟨⟨⟨z⟩, hz⟩, h⟩
      rw [Submodule.Quotient.quot_mk_eq_mk, Ideal.Quotient.mk_eq_mk, Ideal.mem_quotient_iff_mem_sup,
        sup_eq_left.mpr Pe_le_Pi1] at hz
      

Proof state:
case intro.mk.mk
R : Type u
inst✝⁴ : CommRing R
S : Type v
inst✝³ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
hfp : NeZero e
inst✝² : IsDomain S
inst✝¹ : IsDedekindDomain S
inst✝ : IsPrime P
i : ℕ
hi : i < e
a : S
a_mem : a ∈ P ^ i
a_not_mem : a ∉ P ^ (i + 1)
x✝ : S ⧸ P
x : S
y✝ : S ⧸ P
y : S
Pe_le_Pi1 : P ^ e ≤ P ^ (i + 1)
val✝ : S ⧸ P ^ e
z : S
hz✝ : Quot.mk Setoid.r z ∈ map (Quotient.mk (P ^ e)) (P ^ (i + 1))
hz : z ∈ P ^ (i + 1)
h :
  ↑((powQuotSuccInclusion f p P i) { val := Quot.mk Setoid.r z, property := hz✝ }) =
    (Quotient.mk (P ^ e)) (x * a) - (Quotient.mk (P ^ e)) (y * a)
⊢ x - y ∈ P

Next tactic:
rw [powQuotSuccInclusion_apply_coe, Subtype.coe_mk, Submodule.Quotient.quot_mk_eq_mk,
        Ideal.Quotient.mk_eq_mk, ← map_sub, Ideal.Quotient.eq, ← sub_mul] at h