lean4-htt/tests/lean/run/grind_10983.lean
Kim Morrison fe8238c76c
feat: grind cases on Sum (#11087)
This PR enables `grind` to case bash on `Sum` and `PSum`.
2025-11-11 04:50:34 +00:00

13 lines
416 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

structure Equiv (α : Type _) (β : Type _) where
toFun : α → β
invFun : β → α
left_inv : ∀ x, invFun (toFun x) = x
def sumEquivSigmaBool (α β) : Equiv (α ⊕ β) (Σ b, bif b then β else α) where
toFun s := s.elim (fun x => ⟨false, x⟩) fun x => ⟨true, x⟩
invFun s :=
match s with
| ⟨false, a⟩ => .inl a
| ⟨true, b⟩ => .inr b
left_inv := fun s => by
grind