Theorem: IsBezout.TFAE
File: Mathlib/RingTheory/Bezout.lean

tactic: tfae_have 1 → 2
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
⊢ List.TFAE [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R]

tactic: tfae_have 2 → 3
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
⊢ List.TFAE [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R]

tactic: tfae_have 3 → 4
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
⊢ List.TFAE [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R]

tactic: tfae_have 4 → 1
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
⊢ List.TFAE [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R]

tactic: tfae_finish
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
tfae_4_to_1 : WfDvdMonoid R → IsNoetherianRing R
⊢ List.TFAE [IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R]

tactic: intro H
state_before: case tfae_1_to_2
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
⊢ IsNoetherianRing R → IsPrincipalIdealRing R

tactic: exact ⟨fun I => isPrincipal_of_FG _ (IsNoetherian.noetherian _)⟩
state_before: case tfae_1_to_2
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
H : IsNoetherianRing R
⊢ IsPrincipalIdealRing R

tactic: intro
state_before: case tfae_2_to_3
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
⊢ IsPrincipalIdealRing R → UniqueFactorizationMonoid R

tactic: infer_instance
state_before: case tfae_2_to_3
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
✝ : IsPrincipalIdealRing R
⊢ UniqueFactorizationMonoid R

tactic: intro
state_before: case tfae_3_to_4
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
⊢ UniqueFactorizationMonoid R → WfDvdMonoid R

tactic: infer_instance
state_before: case tfae_3_to_4
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
✝ : UniqueFactorizationMonoid R
⊢ WfDvdMonoid R

tactic: rintro ⟨h⟩
state_before: case tfae_4_to_1
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
⊢ WfDvdMonoid R → IsNoetherianRing R

tactic: rw [isNoetherianRing_iff, isNoetherian_iff_fg_wellFounded]
state_before: case tfae_4_to_1.mk
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
⊢ IsNoetherianRing R

tactic: apply RelEmbedding.wellFounded _ h
state_before: case tfae_4_to_1.mk
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
⊢ WellFounded fun x x_1 => x > x_1

tactic: have : ∀ I : { J : Ideal R // J.FG }, ∃ x : R, (I : Ideal R) = Ideal.span {x} :=
  fun ⟨I, hI⟩ => (IsBezout.isPrincipal_of_FG I hI).1
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
⊢ (fun x x_1 => x > x_1) ↪r DvdNotUnit

tactic: choose f hf using this
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
this : ∀ (I : { J // Ideal.FG J }), ∃ x, ↑I = Ideal.span {x}
⊢ (fun x x_1 => x > x_1) ↪r DvdNotUnit

tactic: exact
  { toFun := f
    inj' := fun x y e => by ext1; rw [hf, hf, e]
    map_rel_iff' := by
      dsimp
      intro a b
      rw [← Ideal.span_singleton_lt_span_singleton, ← hf, ← hf]
      rfl }
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
⊢ (fun x x_1 => x > x_1) ↪r DvdNotUnit

tactic: ext1
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
x y : { N // Submodule.FG N }
e : f x = f y
⊢ x = y

tactic: rw [hf, hf, e]
state_before: case a
R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
x y : { N // Submodule.FG N }
e : f x = f y
⊢ ↑x = ↑y

tactic: dsimp
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
⊢ ∀ {a b : { N // Submodule.FG N }},
    DvdNotUnit (↑{ toFun := f, inj' := (_ : ∀ (x y : { N // Submodule.FG N }), f x = f y → x = y) } a)
        (↑{ toFun := f, inj' := (_ : ∀ (x y : { N // Submodule.FG N }), f x = f y → x = y) } b) ↔
      a > b

tactic: intro a b
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
⊢ ∀ {a b : { N // Submodule.FG N }}, DvdNotUnit (f a) (f b) ↔ a > b

tactic: rw [← Ideal.span_singleton_lt_span_singleton, ← hf, ← hf]
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
a b : { N // Submodule.FG N }
⊢ DvdNotUnit (f a) (f b) ↔ a > b

tactic: rfl
state_before: R : Type u
inst✝² : CommRing R
inst✝¹ : IsBezout R
inst✝ : IsDomain R
tfae_1_to_2 : IsNoetherianRing R → IsPrincipalIdealRing R
tfae_2_to_3 : IsPrincipalIdealRing R → UniqueFactorizationMonoid R
tfae_3_to_4 : UniqueFactorizationMonoid R → WfDvdMonoid R
h : WellFounded DvdNotUnit
f : { J // Ideal.FG J } → R
hf : ∀ (I : { J // Ideal.FG J }), ↑I = Ideal.span {f I}
a b : { N // Submodule.FG N }
⊢ ↑b < ↑a ↔ a > b