Theorem: Finset.mem_finsupp_iff
File: Mathlib/Data/Finset/Finsupp.lean

tactic: refine mem_map.trans ⟨?_, ?_⟩
state_before: ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
⊢ f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i
state_after: case refine_1
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
⊢ (∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f) → f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i

case refine_2
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
⊢ (f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i) → ∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f

tactic: rintro ⟨f, hf, rfl⟩
state_before: case refine_1
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
⊢ (∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f) → f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i
state_after: case refine_1.intro.intro
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
t : ι → Finset α
f : (i : ι) → i ∈ s → α
hf : f ∈ s.pi t
⊢ ({ toFun := indicator s, inj' := ⋯ } f).support ⊆ s ∧ ∀ i ∈ s, ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i

tactic: refine ⟨support_indicator_subset _ _, fun i hi => ?_⟩
state_before: case refine_1.intro.intro
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
t : ι → Finset α
f : (i : ι) → i ∈ s → α
hf : f ∈ s.pi t
⊢ ({ toFun := indicator s, inj' := ⋯ } f).support ⊆ s ∧ ∀ i ∈ s, ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i
state_after: case refine_1.intro.intro
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
t : ι → Finset α
f : (i : ι) → i ∈ s → α
hf : f ∈ s.pi t
i : ι
hi : i ∈ s
⊢ ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i

tactic: convert mem_pi.1 hf i hi
state_before: case refine_1.intro.intro
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
t : ι → Finset α
f : (i : ι) → i ∈ s → α
hf : f ∈ s.pi t
i : ι
hi : i ∈ s
⊢ ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i
state_after: case h.e'_4
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
t : ι → Finset α
f : (i : ι) → i ∈ s → α
hf : f ∈ s.pi t
i : ι
hi : i ∈ s
⊢ ({ toFun := indicator s, inj' := ⋯ } f) i = f i hi

tactic: exact indicator_of_mem hi _
state_before: case h.e'_4
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
t : ι → Finset α
f : (i : ι) → i ∈ s → α
hf : f ∈ s.pi t
i : ι
hi : i ∈ s
⊢ ({ toFun := indicator s, inj' := ⋯ } f) i = f i hi
state_after: no goals

tactic: refine fun h => ⟨fun i _ => f i, mem_pi.2 h.2, ?_⟩
state_before: case refine_2
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
⊢ (f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i) → ∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f
state_after: case refine_2
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
h : f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i
⊢ ({ toFun := indicator s, inj' := ⋯ } fun i x => f i) = f

tactic: ext i
state_before: case refine_2
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
h : f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i
⊢ ({ toFun := indicator s, inj' := ⋯ } fun i x => f i) = f
state_after: case refine_2.h
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
h : f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i
i : ι
⊢ ({ toFun := indicator s, inj' := ⋯ } fun i x => f i) i = f i

tactic: exact ite_eq_left_iff.2 fun hi => (not_mem_support_iff.1 fun H => hi <| h.1 H).symm
state_before: case refine_2.h
ι : Type u_1
α : Type u_2
inst✝ : Zero α
s : Finset ι
f : ι →₀ α
t : ι → Finset α
h : f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i
i : ι
⊢ ({ toFun := indicator s, inj' := ⋯ } fun i x => f i) i = f i
state_after: no goals