Skip to content

Commit

Permalink
chore(Data/Finset/NatAntidiagonal): naming of antidiagonalEquivFin (#…
Browse files Browse the repository at this point in the history
…6784)

and add `simps`, as pointed out by @eric-wieser in
#6766 (review)
  • Loading branch information
nomeata committed Aug 25, 2023
1 parent e561ee7 commit 7e9ae5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mathlib/Data/Finset/NatAntidiagonal.lean
Expand Up @@ -215,7 +215,8 @@ def sigmaAntidiagonalEquivProd : (Σn : ℕ, antidiagonal n) ≃ ℕ × ℕ wher
end EquivProd

/-- The set `antidiagonal n` is equivalent to `Fin (n+1)`, via the first projection. --/
def antidiagonal_equiv_fin (n : ℕ) : antidiagonal n ≃ Fin (n + 1) where
@[simps]
def antidiagonalEquivFin (n : ℕ) : antidiagonal n ≃ Fin (n + 1) where
toFun := fun ⟨⟨i, j⟩, h⟩ ↦ ⟨i, antidiagonal.fst_lt h⟩
invFun := fun ⟨i, h⟩ ↦ ⟨⟨i, n - i⟩, by
rw [mem_antidiagonal, add_comm, tsub_add_cancel_iff_le]
Expand Down

0 comments on commit 7e9ae5f

Please sign in to comment.