Theorem: Cardinal.prod_eq_of_fintype
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: revert f
state_before: α✝ β α : Type u
h : Fintype α
f : α → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : α, f i)
state_after: α✝ β α : Type u
h : Fintype α
⊢ ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)

tactic: refine Fintype.induction_empty_option ?_ ?_ ?_ α (h_fintype := h)
state_before: α✝ β α : Type u
h : Fintype α
⊢ ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
state_after: case refine_1
α✝ β α : Type u
h : Fintype α
⊢ ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β),
    (∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)) →
      ∀ (f : β → Cardinal.{v}), prod f = lift.{u, v} (∏ i : β, f i)

case refine_2
α✝ β α : Type u
h : Fintype α
⊢ ∀ (f : PEmpty.{u + 1} → Cardinal.{v}), prod f = lift.{u, v} (∏ i : PEmpty.{u + 1}, f i)

case refine_3
α✝ β α : Type u
h : Fintype α
⊢ ∀ (α : Type u) [inst : Fintype α],
    (∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)) →
      ∀ (f : Option α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : Option α, f i)

tactic: intro α β hβ e h f
state_before: case refine_1
α✝ β α : Type u
h : Fintype α
⊢ ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β),
    (∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)) →
      ∀ (f : β → Cardinal.{v}), prod f = lift.{u, v} (∏ i : β, f i)
state_after: case refine_1
α✝¹ β✝ α✝ : Type u
h✝ : Fintype α✝
α β : Type u
hβ : Fintype β
e : α ≃ β
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : β → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : β, f i)

tactic: letI := Fintype.ofEquiv β e.symm
state_before: case refine_1
α✝¹ β✝ α✝ : Type u
h✝ : Fintype α✝
α β : Type u
hβ : Fintype β
e : α ≃ β
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : β → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : β, f i)
state_after: case refine_1
α✝¹ β✝ α✝ : Type u
h✝ : Fintype α✝
α β : Type u
hβ : Fintype β
e : α ≃ β
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : β → Cardinal.{v}
this : Fintype α := Fintype.ofEquiv β e.symm
⊢ prod f = lift.{u, v} (∏ i : β, f i)

tactic: rw [← e.prod_comp f, ← h]
state_before: case refine_1
α✝¹ β✝ α✝ : Type u
h✝ : Fintype α✝
α β : Type u
hβ : Fintype β
e : α ≃ β
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : β → Cardinal.{v}
this : Fintype α := Fintype.ofEquiv β e.symm
⊢ prod f = lift.{u, v} (∏ i : β, f i)
state_after: case refine_1
α✝¹ β✝ α✝ : Type u
h✝ : Fintype α✝
α β : Type u
hβ : Fintype β
e : α ≃ β
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : β → Cardinal.{v}
this : Fintype α := Fintype.ofEquiv β e.symm
⊢ prod f = prod fun i => f (e i)

tactic: exact mk_congr (e.piCongrLeft _).symm
state_before: case refine_1
α✝¹ β✝ α✝ : Type u
h✝ : Fintype α✝
α β : Type u
hβ : Fintype β
e : α ≃ β
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : β → Cardinal.{v}
this : Fintype α := Fintype.ofEquiv β e.symm
⊢ prod f = prod fun i => f (e i)
state_after: no goals

tactic: intro f
state_before: case refine_2
α✝ β α : Type u
h : Fintype α
⊢ ∀ (f : PEmpty.{u + 1} → Cardinal.{v}), prod f = lift.{u, v} (∏ i : PEmpty.{u + 1}, f i)
state_after: case refine_2
α✝ β α : Type u
h : Fintype α
f : PEmpty.{u + 1} → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : PEmpty.{u + 1}, f i)

tactic: rw [Fintype.univ_pempty, Finset.prod_empty, lift_one, Cardinal.prod, mk_eq_one]
state_before: case refine_2
α✝ β α : Type u
h : Fintype α
f : PEmpty.{u + 1} → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : PEmpty.{u + 1}, f i)
state_after: no goals

tactic: intro α hα h f
state_before: case refine_3
α✝ β α : Type u
h : Fintype α
⊢ ∀ (α : Type u) [inst : Fintype α],
    (∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)) →
      ∀ (f : Option α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : Option α, f i)
state_after: case refine_3
α✝¹ β α✝ : Type u
h✝ : Fintype α✝
α : Type u
hα : Fintype α
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : Option α → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : Option α, f i)

tactic: rw [Cardinal.prod, mk_congr Equiv.piOptionEquivProd, mk_prod, lift_umax'.{v, u}, mk_out, ←
    Cardinal.prod, lift_prod, Fintype.prod_option, lift_mul, ← h fun a => f (some a)]
state_before: case refine_3
α✝¹ β α✝ : Type u
h✝ : Fintype α✝
α : Type u
hα : Fintype α
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : Option α → Cardinal.{v}
⊢ prod f = lift.{u, v} (∏ i : Option α, f i)
state_after: case refine_3
α✝¹ β α✝ : Type u
h✝ : Fintype α✝
α : Type u
hα : Fintype α
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : Option α → Cardinal.{v}
⊢ (lift.{u, v} (f none) * prod fun i => lift.{v, v} (f (some i))) = lift.{u, v} (f none) * prod fun a => f (some a)

tactic: simp only [lift_id]
state_before: case refine_3
α✝¹ β α✝ : Type u
h✝ : Fintype α✝
α : Type u
hα : Fintype α
h : ∀ (f : α → Cardinal.{v}), prod f = lift.{u, v} (∏ i : α, f i)
f : Option α → Cardinal.{v}
⊢ (lift.{u, v} (f none) * prod fun i => lift.{v, v} (f (some i))) = lift.{u, v} (f none) * prod fun a => f (some a)
state_after: no goals