Skip to content

Commit 5df70e4

Browse files
committed
.
1 parent 6bebfc4 commit 5df70e4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Init/Data/Array/Lemmas.lean

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ namespace Array
18791879
induction as
18801880
simp
18811881

1882-
/-! ### findSomeRevM? and findRevM? -/
1882+
/-! ### findSomeRevM?, findRevM?, findSomeRev?, findRev? -/
18831883

18841884
@[simp] theorem findSomeRevM?_eq_findSomeM?_reverse
18851885
[Monad m] [LawfulMonad m] (f : α → m (Option β)) (as : Array α) :
@@ -1895,6 +1895,16 @@ namespace Array
18951895
rw [List.findRevM?_toArray]
18961896
simp
18971897

1898+
@[simp] theorem findSomeRev?_eq_findSome?_reverse (f : α → Option β) (as : Array α) :
1899+
as.findSomeRev? f = as.reverse.findSome? f := by
1900+
cases as
1901+
simp [findSomeRev?, Id.run]
1902+
1903+
@[simp] theorem findRev?_eq_find?_reverse (f : α → Bool) (as : Array α) :
1904+
as.findRev? f = as.reverse.find? f := by
1905+
cases as
1906+
simp [findRev?, Id.run]
1907+
18981908
/-! ### unzip -/
18991909

19001910
@[simp] theorem fst_unzip (as : Array (α × β)) : (Array.unzip as).fst = as.map Prod.fst := by

0 commit comments

Comments
 (0)