Theorem: DFinsupp.subtypeSupportEqEquiv_apply_coe
File: Mathlib/Data/DFinsupp/Basic.lean

Proof steps:
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
f : (i : { x // x ∈ s }) → { x // x ≠ 0 }
i : ι
⊢ i ∈ (mk s fun i => ↑(f i)).support ↔ i ∈ s
state_after: no goals
tactic: calc
      i ∈ support (mk s fun i ↦ (f i).1) ↔ ∃ h : i ∈ s, (f ⟨i, h⟩).1 ≠ 0 := by simp
      _ ↔ ∃ _ : i ∈ s, True := exists_congr fun h ↦ (iff_true _).mpr (f _).2
      _ ↔ i ∈ s := by simp
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
⊢ Function.LeftInverse (fun f => ⟨mk s fun i => ↑(f i), ⋯⟩) fun x =>
    match (motive := { f // f.support = s } → (i : { x // x ∈ s }) → { x // x ≠ 0 }) x with
    | ⟨f, hf⟩ => fun x =>
      match x with
      | ⟨i, hi⟩ => ⟨f i, ⋯⟩
state_after: case mk
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
f : Π₀ (i : ι), β i
⊢ (fun f_1 => ⟨mk f.support fun i => ↑(f_1 i), ⋯⟩)
      ((fun x =>
          match (motive := { f_1 // f_1.support = f.support } → (i : { x // x ∈ f.support }) → { x // x ≠ 0 }) x with
          | ⟨f_1, hf⟩ => fun x =>
            match x with
            | ⟨i, hi⟩ => ⟨f_1 i, ⋯⟩)
        ⟨f, ⋯⟩) =
    ⟨f, ⋯⟩
tactic: rintro ⟨f, rfl⟩
state_before: case mk
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
f : Π₀ (i : ι), β i
⊢ (fun f_1 => ⟨mk f.support fun i => ↑(f_1 i), ⋯⟩)
      ((fun x =>
          match (motive := { f_1 // f_1.support = f.support } → (i : { x // x ∈ f.support }) → { x // x ≠ 0 }) x with
          | ⟨f_1, hf⟩ => fun x =>
            match x with
            | ⟨i, hi⟩ => ⟨f_1 i, ⋯⟩)
        ⟨f, ⋯⟩) =
    ⟨f, ⋯⟩
state_after: case mk.a.h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
f : Π₀ (i : ι), β i
i : ι
⊢ ↑((fun f_1 => ⟨mk f.support fun i => ↑(f_1 i), ⋯⟩)
          ((fun x =>
              match (motive := { f_1 // f_1.support = f.support } → (i : { x // x ∈ f.support }) → { x // x ≠ 0 })
                x with
              | ⟨f_1, hf⟩ => fun x =>
                match x with
                | ⟨i, hi⟩ => ⟨f_1 i, ⋯⟩)
            ⟨f, ⋯⟩))
      i =
    ↑⟨f, ⋯⟩ i
tactic: ext i
state_before: case mk.a.h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
f : Π₀ (i : ι), β i
i : ι
⊢ ↑((fun f_1 => ⟨mk f.support fun i => ↑(f_1 i), ⋯⟩)
          ((fun x =>
              match (motive := { f_1 // f_1.support = f.support } → (i : { x // x ∈ f.support }) → { x // x ≠ 0 })
                x with
              | ⟨f_1, hf⟩ => fun x =>
                match x with
                | ⟨i, hi⟩ => ⟨f_1 i, ⋯⟩)
            ⟨f, ⋯⟩))
      i =
    ↑⟨f, ⋯⟩ i
state_after: no goals
tactic: simpa using Eq.symm
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
f : (i : { x // x ∈ s }) → { x // x ≠ 0 }
⊢ (fun x =>
        match (motive := { f // f.support = s } → (i : { x // x ∈ s }) → { x // x ≠ 0 }) x with
        | ⟨f, hf⟩ => fun x =>
          match x with
          | ⟨i, hi⟩ => ⟨f i, ⋯⟩)
      ((fun f => ⟨mk s fun i => ↑(f i), ⋯⟩) f) =
    f
state_after: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
f : (i : { x // x ∈ s }) → { x // x ≠ 0 }
x✝ : { x // x ∈ s }
⊢ (fun x =>
        match (motive := { f // f.support = s } → (i : { x // x ∈ s }) → { x // x ≠ 0 }) x with
        | ⟨f, hf⟩ => fun x =>
          match x with
          | ⟨i, hi⟩ => ⟨f i, ⋯⟩)
      ((fun f => ⟨mk s fun i => ↑(f i), ⋯⟩) f) x✝ =
    f x✝
tactic: ext1
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
f : (i : { x // x ∈ s }) → { x // x ≠ 0 }
x✝ : { x // x ∈ s }
⊢ (fun x =>
        match (motive := { f // f.support = s } → (i : { x // x ∈ s }) → { x // x ≠ 0 }) x with
        | ⟨f, hf⟩ => fun x =>
          match x with
          | ⟨i, hi⟩ => ⟨f i, ⋯⟩)
      ((fun f => ⟨mk s fun i => ↑(f i), ⋯⟩) f) x✝ =
    f x✝
state_after: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
f : (i : { x // x ∈ s }) → { x // x ≠ 0 }
x✝ : { x // x ∈ s }
⊢ f ⟨↑x✝, ⋯⟩ = f x✝
tactic: simp [Subtype.eta]
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Finset ι
f : (i : { x // x ∈ s }) → { x // x ≠ 0 }
x✝ : { x // x ∈ s }
⊢ f ⟨↑x✝, ⋯⟩ = f x✝
state_after: no goals
tactic: rfl