Theorem: ENat.tsum_eq_top_iff (Matroid/ForMathlib/ENatTopology.lean)

State before:
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
⊢ ∑' (a : α), f a = ⊤ ↔ (support f).Infinite ∨ ∃ a, f a = ⊤
Tactic:
refine' ⟨fun h ↦ _, _⟩
State after:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∑' (a : α), f a = ⊤
⊢ (support f).Infinite ∨ ∃ a, f a = ⊤

case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
⊢ ((support f).Infinite ∨ ∃ a, f a = ⊤) → ∑' (a : α), f a = ⊤

State before:
case refine'_2
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
⊢ ((support f).Infinite ∨ ∃ a, f a = ⊤) → ∑' (a : α), f a = ⊤
Tactic:
rintro (h | h)
State after:
case refine'_2.inl
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : (support f).Infinite
⊢ ∑' (a : α), f a = ⊤

case refine'_2.inr
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∃ a, f a = ⊤
⊢ ∑' (a : α), f a = ⊤

State before:
case refine'_2.inr
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∃ a, f a = ⊤
⊢ ∑' (a : α), f a = ⊤
Tactic:
exact ENat.tsum_eq_top_of_eq_top h
State after:
no goals

State before:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∑' (a : α), f a = ⊤
⊢ (support f).Infinite ∨ ∃ a, f a = ⊤
Tactic:
rw [or_iff_not_imp_left, not_infinite]
State after:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∑' (a : α), f a = ⊤
⊢ (support f).Finite → ∃ a, f a = ⊤

State before:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∑' (a : α), f a = ⊤
⊢ (support f).Finite → ∃ a, f a = ⊤
Tactic:
intro hfin
State after:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∑' (a : α), f a = ⊤
hfin : (support f).Finite
⊢ ∃ a, f a = ⊤

State before:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∑' (a : α), f a = ⊤
hfin : (support f).Finite
⊢ ∃ a, f a = ⊤
Tactic:
rw [← tsum_support_eq, Finite.tsum_eq_top_iff hfin] at h
State after:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∃ a ∈ support f, f a = ⊤
hfin : (support f).Finite
⊢ ∃ a, f a = ⊤

State before:
case refine'_1
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : ∃ a ∈ support f, f a = ⊤
hfin : (support f).Finite
⊢ ∃ a, f a = ⊤
Tactic:
obtain ⟨a, -, h⟩ := h
State after:
case refine'_1.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
hfin : (support f).Finite
a : α
h : f a = ⊤
⊢ ∃ a, f a = ⊤

State before:
case refine'_1.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
hfin : (support f).Finite
a : α
h : f a = ⊤
⊢ ∃ a, f a = ⊤
Tactic:
exact ⟨a, h⟩
State after:
no goals

State before:
case refine'_2.inl
α : Type u_1
β : Type u_2
ι : Type u_3
s : Set α
n : ℕ∞
f g : α → ℕ∞
h : (support f).Infinite
⊢ ∑' (a : α), f a = ⊤
Tactic:
exact ENat.tsum_eq_top_of_support_infinite h
State after:
no goals