-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem IsDedekindDomain.exists_representative_mod_finset {ι : Type*} {s : Finset ι}
    (P : ι → Ideal R) (e : ι → ℕ) (prime : ∀ i ∈ s, Prime (P i))
    (coprime : ∀ᵉ (i ∈ s) (j ∈ s), i ≠ j → P i ≠ P j) (x : ∀ i : s, R ⧸ P i ^ e i) :
    ∃ y, ∀ (i) (hi : i ∈ s), Ideal.Quotient.mk (P i ^ e i) y = x ⟨i, hi⟩

Proof state:
case intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
f : R ⧸ ∏ i ∈ s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=
  quotientEquivPiOfFinsetProdEq (∏ i ∈ s, P i ^ e i) P e prime coprime ⋯
y : R ⧸ ∏ i ∈ s, P i ^ e i
⊢ ∃ y_1, ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y_1 = f y ⟨i, hi⟩

Tactic:
obtain ⟨z, rfl⟩ := Ideal.Quotient.mk_surjective y

Result:
case intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
f : R ⧸ ∏ i ∈ s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=
  quotientEquivPiOfFinsetProdEq (∏ i ∈ s, P i ^ e i) P e prime coprime ⋯
z : R
⊢ ∃ y,
    ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y = f ((Ideal.Quotient.mk (∏ i ∈ s, P i ^ e i)) z) ⟨i, hi⟩

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
x : (i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i
f : R ⧸ ∏ i ∈ s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=
  quotientEquivPiOfFinsetProdEq (∏ i ∈ s, P i ^ e i) P e prime coprime ⋯
⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y = x ⟨i, hi⟩

Tactic:
obtain ⟨y, rfl⟩ := f.surjective x

Result:
case intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
f : R ⧸ ∏ i ∈ s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=
  quotientEquivPiOfFinsetProdEq (∏ i ∈ s, P i ^ e i) P e prime coprime ⋯
y : R ⧸ ∏ i ∈ s, P i ^ e i
⊢ ∃ y_1, ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y_1 = f y ⟨i, hi⟩

Proof state:
case intro.intro
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
f : R ⧸ ∏ i ∈ s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=
  quotientEquivPiOfFinsetProdEq (∏ i ∈ s, P i ^ e i) P e prime coprime ⋯
z : R
⊢ ∃ y,
    ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y = f ((Ideal.Quotient.mk (∏ i ∈ s, P i ^ e i)) z) ⟨i, hi⟩

Tactic:
exact ⟨z, fun i _hi => rfl⟩

Result:
no goals

Proof state:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
x : (i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i
⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y = x ⟨i, hi⟩

Tactic:
let f := IsDedekindDomain.quotientEquivPiOfFinsetProdEq _ P e prime coprime rfl

Result:
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDedekindDomain R
ι : Type u_4
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ i ∈ s, Prime (P i)
coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j
x : (i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i
f : R ⧸ ∏ i ∈ s, P i ^ e i ≃+* ((i : { x // x ∈ s }) → R ⧸ P ↑i ^ e ↑i) :=
  quotientEquivPiOfFinsetProdEq (∏ i ∈ s, P i ^ e i) P e prime coprime ⋯
⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), (Ideal.Quotient.mk (P i ^ e i)) y = x ⟨i, hi⟩