chore: grind attributes for Prod (#11085)

This commit is contained in:
Kim Morrison 2025-11-06 07:52:28 +11:00 committed by GitHub
parent 343887e480
commit 28a3cf9a6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -1468,6 +1468,8 @@ def Prod.map {α₁ : Type u₁} {α₂ : Type u₂} {β₁ : Type v₁} {β₂
@[simp] theorem Prod.map_apply (f : α → β) (g : γ → δ) (x) (y) :
Prod.map f g (x, y) = (f x, g y) := rfl
-- We add `@[grind =]` to these in `Init.Data.Prod`.
@[simp] theorem Prod.map_fst (f : α → β) (g : γ → δ) (x) : (Prod.map f g x).1 = f x.1 := rfl
@[simp] theorem Prod.map_snd (f : α → β) (g : γ → δ) (x) : (Prod.map f g x).2 = g x.2 := rfl

View file

@ -12,6 +12,8 @@ public section
namespace Prod
attribute [grind =] Prod.map_fst Prod.map_snd
instance [BEq α] [BEq β] [ReflBEq α] [ReflBEq β] : ReflBEq (α × β) where
rfl {a} := by cases a; simp [BEq.beq]