File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1879,7 +1879,7 @@ namespace Array
1879
1879
induction as
1880
1880
simp
1881
1881
1882
- /-! ### findSomeRevM? and findRevM? -/
1882
+ /-! ### findSomeRevM?, findRevM?, findSomeRev?, findRev ? -/
1883
1883
1884
1884
@[simp] theorem findSomeRevM?_eq_findSomeM?_reverse
1885
1885
[Monad m] [LawfulMonad m] (f : α → m (Option β)) (as : Array α) :
@@ -1895,6 +1895,16 @@ namespace Array
1895
1895
rw [List.findRevM?_toArray]
1896
1896
simp
1897
1897
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
+
1898
1908
/-! ### unzip -/
1899
1909
1900
1910
@[simp] theorem fst_unzip (as : Array (α × β)) : (Array.unzip as).fst = as.map Prod.fst := by
You can’t perform that action at this time.
0 commit comments