[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Fintype α
a : Option α
⊢ a ∈ ↑insertNone univ
[PROOFSTEP]
simp
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Fintype α
⊢ ¬none ∈ map Embedding.some univ
[PROOFSTEP]
simp
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ Trunc (P (ULift (Fin zero)))
[PROOFSTEP]
have : card PEmpty = card (ULift (Fin 0)) := by simp only [card_fin, card_pempty, card_ulift]
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ card PEmpty = card (ULift (Fin 0))
[PROOFSTEP]
simp only [card_fin, card_pempty, card_ulift]
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : card PEmpty = card (ULift (Fin 0))
⊢ Trunc (P (ULift (Fin zero)))
[PROOFSTEP]
apply Trunc.bind (truncEquivOfCardEq this)
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : card PEmpty = card (ULift (Fin 0))
⊢ PEmpty ≃ ULift (Fin 0) → Trunc (P (ULift (Fin zero)))
[PROOFSTEP]
intro e
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : card PEmpty = card (ULift (Fin 0))
e : PEmpty ≃ ULift (Fin 0)
⊢ Trunc (P (ULift (Fin zero)))
[PROOFSTEP]
apply Trunc.mk
[GOAL]
case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : card PEmpty = card (ULift (Fin 0))
e : PEmpty ≃ ULift (Fin 0)
⊢ P (ULift (Fin zero))
[PROOFSTEP]
refine' of_equiv e h_empty
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
⊢ Trunc (P (ULift (Fin (succ n))))
[PROOFSTEP]
have : card (Option (ULift (Fin n))) = card (ULift (Fin n.succ)) := by simp only [card_fin, card_option, card_ulift]
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
⊢ card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))
[PROOFSTEP]
simp only [card_fin, card_option, card_ulift]
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
this : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))
⊢ Trunc (P (ULift (Fin (succ n))))
[PROOFSTEP]
apply Trunc.bind (truncEquivOfCardEq this)
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
this : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))
⊢ Option (ULift (Fin n)) ≃ ULift (Fin (succ n)) → Trunc (P (ULift (Fin (succ n))))
[PROOFSTEP]
intro e
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
this : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))
e : Option (ULift (Fin n)) ≃ ULift (Fin (succ n))
⊢ Trunc (P (ULift (Fin (succ n))))
[PROOFSTEP]
apply Trunc.map _ (ind n)
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
this : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))
e : Option (ULift (Fin n)) ≃ ULift (Fin (succ n))
⊢ P (ULift (Fin n)) → P (ULift (Fin (succ n)))
[PROOFSTEP]
intro ih
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
n : ℕ
this : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))
e : Option (ULift (Fin n)) ≃ ULift (Fin (succ n))
ih : P (ULift (Fin n))
⊢ P (ULift (Fin (succ n)))
[PROOFSTEP]
refine' of_equiv e (h_option ih)
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ Trunc (P α)
[PROOFSTEP]
suffices ∀ n : ℕ, Trunc (P (ULift <| Fin n))
  by
  apply Trunc.bind (this (Fintype.card α))
  intro h
  apply Trunc.map _ (Fintype.truncEquivFin α)
  intro e
  exact of_equiv (Equiv.ulift.trans e.symm) h
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : (n : ℕ) → Trunc (P (ULift (Fin n)))
⊢ Trunc (P α)
[PROOFSTEP]
apply Trunc.bind (this (Fintype.card α))
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : (n : ℕ) → Trunc (P (ULift (Fin n)))
⊢ P (ULift (Fin (card α))) → Trunc (P α)
[PROOFSTEP]
intro h
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : (n : ℕ) → Trunc (P (ULift (Fin n)))
h : P (ULift (Fin (card α)))
⊢ Trunc (P α)
[PROOFSTEP]
apply Trunc.map _ (Fintype.truncEquivFin α)
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : (n : ℕ) → Trunc (P (ULift (Fin n)))
h : P (ULift (Fin (card α)))
⊢ α ≃ Fin (card α) → P α
[PROOFSTEP]
intro e
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
this : (n : ℕ) → Trunc (P (ULift (Fin n)))
h : P (ULift (Fin (card α)))
e : α ≃ Fin (card α)
⊢ P α
[PROOFSTEP]
exact of_equiv (Equiv.ulift.trans e.symm) h
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Sort v
of_equiv : {α β : Type u} → α ≃ β → P α → P β
h_empty : P PEmpty
h_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)
α : Type u
inst✝¹ : Fintype α
inst✝ : DecidableEq α
⊢ (n : ℕ) → Trunc (P (ULift (Fin n)))
[PROOFSTEP]
apply ind
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : (α : Type u) → [inst : Fintype α] → Prop
of_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β
h_empty : P PEmpty
h_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)
α : Type u
h_fintype : Fintype α
⊢ P α
[PROOFSTEP]
obtain ⟨p⟩ :=
  let f_empty := fun i => by convert h_empty
  let h_option :
    ∀ {α : Type u} [Fintype α] [DecidableEq α], (∀ (h : Fintype α), P α) → ∀ (h : Fintype (Option α)), P (Option α) :=
    by
    rintro α hα - Pα hα'
    convert h_option α (Pα _)
  @truncRecEmptyOption (fun α => ∀ h, @P α h) (@fun α β e hα hβ => @of_equiv α β hβ e (hα _)) f_empty h_option α _
    (Classical.decEq α)
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : (α : Type u) → [inst : Fintype α] → Prop
of_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β
h_empty : P PEmpty
h_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)
α : Type u
h_fintype : Fintype α
i : Fintype PEmpty
⊢ P PEmpty
[PROOFSTEP]
convert h_empty
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : (α : Type u) → [inst : Fintype α] → Prop
of_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β
h_empty : P PEmpty
h_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)
α : Type u
h_fintype : Fintype α
f_empty : ∀ (i : Fintype PEmpty), P PEmpty := fun i => ?m.7851 i
⊢ ∀ {α : Type u} [inst : Fintype α] [inst : DecidableEq α],
    (∀ (h : Fintype α), P α) → ∀ (h : Fintype (Option α)), P (Option α)
[PROOFSTEP]
rintro α hα - Pα hα'
[GOAL]
α✝¹ : Type u_1
β : Type u_2
γ : Type u_3
P : (α : Type u) → [inst : Fintype α] → Prop
of_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β
h_empty : P PEmpty
h_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)
α✝ : Type u
h_fintype : Fintype α✝
f_empty : ∀ (i : Fintype PEmpty), P PEmpty := fun i => ?m.7851 i
α : Type u
hα : Fintype α
Pα : ∀ (h : Fintype α), P α
hα' : Fintype (Option α)
⊢ P (Option α)
[PROOFSTEP]
convert h_option α (Pα _)
[GOAL]
case mk
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : (α : Type u) → [inst : Fintype α] → Prop
of_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β
h_empty : P PEmpty
h_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)
α : Type u
h_fintype : Fintype α
x✝ : Trunc (∀ (h : Fintype α), P α)
p : ∀ (h : Fintype α), P α
⊢ P α
[PROOFSTEP]
exact
  p
    _
      -- ·
[GOAL]
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Prop
of_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β
h_empty : P PEmpty
h_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)
α : Type u
inst✝ : Finite α
⊢ P α
[PROOFSTEP]
cases nonempty_fintype α
[GOAL]
case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Prop
of_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β
h_empty : P PEmpty
h_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)
α : Type u
inst✝ : Finite α
val✝ : Fintype α
⊢ P α
[PROOFSTEP]
refine' Fintype.induction_empty_option _ _ _ α
[GOAL]
case intro.refine'_1
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Prop
of_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β
h_empty : P PEmpty
h_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)
α : Type u
inst✝ : Finite α
val✝ : Fintype α
⊢ ∀ (α β : Type u) [inst : Fintype β], α ≃ β → P α → P β
case intro.refine'_2
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Prop
of_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β
h_empty : P PEmpty
h_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)
α : Type u
inst✝ : Finite α
val✝ : Fintype α
⊢ P PEmpty
case intro.refine'_3
α✝ : Type u_1
β : Type u_2
γ : Type u_3
P : Type u → Prop
of_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β
h_empty : P PEmpty
h_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)
α : Type u
inst✝ : Finite α
val✝ : Fintype α
⊢ ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)
[PROOFSTEP]
exacts [fun α β _ => of_equiv, h_empty, @h_option]
