refine trans (r:=Eq) ?_ (count_image_le_card (f ∘ Subtype.val))
α : Type u
β : Type v
inst✝⁴ : BishopFin α
inst✝³ : BishopFin β
p q : α → Prop
inst✝² : DecidablePred p
inst✝¹ : DecidablePred q
inst✝ : DecidableEq β
f : α → β
⊢ (count fun b => ∃ a, p a ∧ f a = b) ≤ card { a // p a }
α : Type u
β : Type v
inst✝⁴ : BishopFin α
inst✝³ : BishopFin β
p q : α → Prop
inst✝² : DecidablePred p
inst✝¹ : DecidablePred q
inst✝ : DecidableEq β
f : α → β
⊢ (count fun b => ∃ a, p a ∧ f a = b) = count fun b => ∃ a, (f ∘ Subtype.val) a = b