@@ -3543,32 +3543,32 @@ theorem eraseIdx_eq_eraseIdxIfInBounds {a : Array α} {i : Nat} (h : i < a.size)
3543
3543
/-! ### zipWith -/
3544
3544
3545
3545
@[simp] theorem toList_zipWith (f : α → β → γ) (as : Array α) (bs : Array β) :
3546
- (Array. zipWith as bs f ).toList = List.zipWith f as.toList bs.toList := by
3546
+ (zipWith f as bs).toList = List.zipWith f as.toList bs.toList := by
3547
3547
cases as
3548
3548
cases bs
3549
3549
simp
3550
3550
3551
3551
@[simp] theorem toList_zip (as : Array α) (bs : Array β) :
3552
- (Array. zip as bs).toList = List.zip as.toList bs.toList := by
3552
+ (zip as bs).toList = List.zip as.toList bs.toList := by
3553
3553
simp [zip, toList_zipWith, List.zip]
3554
3554
3555
3555
@[simp] theorem toList_zipWithAll (f : Option α → Option β → γ) (as : Array α) (bs : Array β) :
3556
- (Array. zipWithAll as bs f ).toList = List.zipWithAll f as.toList bs.toList := by
3556
+ (zipWithAll f as bs).toList = List.zipWithAll f as.toList bs.toList := by
3557
3557
cases as
3558
3558
cases bs
3559
3559
simp
3560
3560
3561
3561
@[simp] theorem size_zipWith (as : Array α) (bs : Array β) (f : α → β → γ) :
3562
- (as. zipWith bs f ).size = min as.size bs.size := by
3562
+ (zipWith f as bs ).size = min as.size bs.size := by
3563
3563
rw [size_eq_length_toList, toList_zipWith, List.length_zipWith]
3564
3564
3565
3565
@[simp] theorem size_zip (as : Array α) (bs : Array β) :
3566
3566
(as.zip bs).size = min as.size bs.size :=
3567
3567
as.size_zipWith bs Prod.mk
3568
3568
3569
3569
@[simp] theorem getElem_zipWith (as : Array α) (bs : Array β) (f : α → β → γ) (i : Nat)
3570
- (hi : i < (as. zipWith bs f ).size) :
3571
- (as. zipWith bs f )[i] = f (as[i]'(by simp at hi; omega)) (bs[i]'(by simp at hi; omega)) := by
3570
+ (hi : i < (zipWith f as bs ).size) :
3571
+ (zipWith f as bs )[i] = f (as[i]'(by simp at hi; omega)) (bs[i]'(by simp at hi; omega)) := by
3572
3572
cases as
3573
3573
cases bs
3574
3574
simp
0 commit comments