-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
theorem eq_zero_or_one (I : FractionalIdeal K⁰ L) : I = 0 ∨ I = 1

Proof state:
case mp.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
n : K
d : ↥K⁰
x_mem : mk' L n d ∈ I
⊢ ∃ x', (algebraMap K L) x' = mk' L n d

Tactic:
refine ⟨n / d, ?_⟩

Result:
case mp.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
n : K
d : ↥K⁰
x_mem : mk' L n d ∈ I
⊢ (algebraMap K L) (n / ↑d) = mk' L n d

Proof state:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
⊢ I = 0 ∨ I = 1

Tactic:
rw [or_iff_not_imp_left]

Result:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
⊢ ¬I = 0 → I = 1

Proof state:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
⊢ x ∈ I ↔ ∃ x', (algebraMap K L) x' = x

Tactic:
constructor

Result:
case mp
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
⊢ x ∈ I → ∃ x', (algebraMap K L) x' = x

case mpr
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
⊢ (∃ x', (algebraMap K L) x' = x) → x ∈ I

Proof state:
case mpr
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
⊢ (∃ x', (algebraMap K L) x' = x) → x ∈ I

Tactic:
rintro ⟨x, rfl⟩

Result:
case mpr.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : K
⊢ (algebraMap K L) x ∈ I

Proof state:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
⊢ ∀ (x : L), x ∈ I ↔ ∃ x', (algebraMap K L) x' = x

Tactic:
intro x

Result:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
⊢ x ∈ I ↔ ∃ x', (algebraMap K L) x' = x

Proof state:
case mpr.intro.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x y : K
y_ne : y ≠ 0
y_mem : (algebraMap K L) y ∈ I
⊢ (x / y) • (algebraMap K L) y ∈ I

Tactic:
exact smul_mem (M := L) I (x / y) y_mem

Result:
no goals

Proof state:
case mpr.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : K
⊢ (algebraMap K L) x ∈ I

Tactic:
obtain ⟨y, y_ne, y_mem⟩ := exists_ne_zero_mem_isInteger hI

Result:
case mpr.intro.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x y : K
y_ne : y ≠ 0
y_mem : (algebraMap K L) y ∈ I
⊢ (algebraMap K L) x ∈ I

Proof state:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
⊢ I = 1

Tactic:
simp_rw [@SetLike.ext_iff _ _ _ I 1, mem_one_iff]

Result:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
⊢ ∀ (x : L), x ∈ I ↔ ∃ x', (algebraMap K L) x' = x

Proof state:
case mpr.intro.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x y : K
y_ne : y ≠ 0
y_mem : (algebraMap K L) y ∈ I
⊢ (algebraMap K L) x ∈ I

Tactic:
rw [← div_mul_cancel₀ x y_ne, RingHom.map_mul, ← Algebra.smul_def]

Result:
case mpr.intro.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x y : K
y_ne : y ≠ 0
y_mem : (algebraMap K L) y ∈ I
⊢ (x / y) • (algebraMap K L) y ∈ I

Proof state:
case mp.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
n : K
d : ↥K⁰
x_mem : mk' L n d ∈ I
⊢ (algebraMap K L) (n / ↑d) = mk' L n d

Tactic:
rw [map_div₀, IsFractionRing.mk'_eq_div]

Result:
no goals

Proof state:
case mp
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
⊢ x ∈ I → ∃ x', (algebraMap K L) x' = x

Tactic:
intro x_mem

Result:
case mp
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
x_mem : x ∈ I
⊢ ∃ x', (algebraMap K L) x' = x

Proof state:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
⊢ ¬I = 0 → I = 1

Tactic:
intro hI

Result:
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
⊢ I = 1

Proof state:
case mp
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
x : L
x_mem : x ∈ I
⊢ ∃ x', (algebraMap K L) x' = x

Tactic:
obtain ⟨n, d, rfl⟩ := IsLocalization.mk'_surjective K⁰ x

Result:
case mp.intro.intro
K : Type u_4
L : Type u_5
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsFractionRing K L
I : FractionalIdeal K⁰ L
hI : ¬I = 0
n : K
d : ↥K⁰
x_mem : mk' L n d ∈ I
⊢ ∃ x', (algebraMap K L) x' = mk' L n d