Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: port Data.Fintype.Array (#5792)
The dashboard says > port, but completely rewrite in terms of the new array However, the new `Array T` isn't finite like `array n T` was, so the rewrite amounts to just deleting everything in the file. Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
- Loading branch information
1 parent
278a8fe
commit ddfe2a5
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/- | ||
Copyright (c) 2017 Mario Carneiro. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Mario Carneiro | ||
! This file was ported from Lean 3 source module data.fintype.array | ||
! leanprover-community/mathlib commit 78314d08d707a6338079f00094bbdb90bf11fc41 | ||
! Please do not edit these lines, except to modify the commit id | ||
! if you have ported upstream changes. | ||
-/ | ||
import Mathlib.Data.Fintype.Pi | ||
import Mathlib.Data.Fintype.Vector | ||
import Mathlib.Logic.Equiv.Array | ||
|
||
/-! | ||
# `align` information for `Fintype` declarations around mathlib3's `array` (now `Vector`) | ||
-/ | ||
|
||
|
||
variable {α : Type _} | ||
|
||
-- porting note: `DArray` does not exist in std4/mathlib4 | ||
-- instance DArray.fintype {n : ℕ} {α : Fin n → Type _} [∀ n, Fintype (α n)] : | ||
-- Fintype (DArray n α) := | ||
-- Fintype.ofEquiv _ (Equiv.dArrayEquivFin _).symm | ||
#noalign d_array.fintype | ||
|
||
-- porting note: The closest thing to `Array' n α` is `Vector n α`, for which we already have this | ||
-- intance elsewhere. | ||
-- instance Array'.fintype {n : ℕ} {α : Type _} [Fintype α] : Fintype (Array' n α) := | ||
-- DArray.fintype | ||
#align array.fintype Vector.fintypeₓ |