Theorem: Set.WellFoundedOn.acc_iff_wellFoundedOn
File: Mathlib/Order/WellFoundedSet.lean

tactic: tfae_have 1 → 2
state_before: ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]

tactic: tfae_have 2 → 3
state_before: ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
tfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r
⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]

tactic: tfae_have 3 → 1
state_before: ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
tfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r
tfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r
⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]

tactic: tfae_finish
state_before: ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
tfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r
tfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r
tfae_3_to_1 : WellFoundedOn {b | TransGen r b a} r → Acc r a
⊢ TFAE [Acc r a, WellFoundedOn {b | ReflTransGen r b a} r, WellFoundedOn {b | TransGen r b a} r]

tactic: refine fun h => ⟨fun b => InvImage.accessible _ ?_⟩
state_before: case tfae_1_to_2
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
⊢ Acc r a → WellFoundedOn {b | ReflTransGen r b a} r

tactic: rw [← acc_transGen_iff] at h ⊢
state_before: case tfae_1_to_2
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
h : Acc r a
b : ↑{b | ReflTransGen r b a}
⊢ Acc r ↑b

tactic: obtain h' | h' := reflTransGen_iff_eq_or_transGen.1 b.2
state_before: case tfae_1_to_2
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
h : Acc (TransGen r) a
b : ↑{b | ReflTransGen r b a}
⊢ Acc (TransGen r) ↑b

tactic: rwa [h'] at h
state_before: case tfae_1_to_2.inl
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
h : Acc (TransGen r) a
b : ↑{b | ReflTransGen r b a}
h' : a = ↑b
⊢ Acc (TransGen r) ↑b

tactic: exact h.inv h'
state_before: case tfae_1_to_2.inr
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
h : Acc (TransGen r) a
b : ↑{b | ReflTransGen r b a}
h' : TransGen r (↑b) a
⊢ Acc (TransGen r) ↑b

tactic: exact fun h => h.subset fun _ => TransGen.to_reflTransGen
state_before: case tfae_2_to_3
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
tfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r
⊢ WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r

tactic: refine fun h => Acc.intro _ (fun b hb => (h.apply ⟨b, .single hb⟩).of_fibration Subtype.val ?_)
state_before: case tfae_3_to_1
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
tfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r
tfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r
⊢ WellFoundedOn {b | TransGen r b a} r → Acc r a

tactic: exact fun ⟨c, hc⟩ d h => ⟨⟨d, .head h hc⟩, h, rfl⟩
state_before: case tfae_3_to_1
ι : Type ?u.5635
α✝ : Type ?u.5638
β : Type ?u.5641
r✝ r' : α✝ → α✝ → Prop
s t : Set α✝
x y : α✝
α : Type u_1
r : α → α → Prop
a : α
tfae_1_to_2 : Acc r a → WellFoundedOn {b | ReflTransGen r b a} r
tfae_2_to_3 : WellFoundedOn {b | ReflTransGen r b a} r → WellFoundedOn {b | TransGen r b a} r
h : WellFoundedOn {b | TransGen r b a} r
b : α
hb : r b a
⊢ Fibration (fun a_1 b => r ↑a_1 ↑b) r Subtype.val