File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ Additions to existing modules
323323 mapMaybe-cong : f ≗ g → mapMaybe f ≗ mapMaybe g
324324 zipWith-cong : (∀ a b → f a b ≡ g a b) → ∀ as → zipWith f as ≗ zipWith g as
325325 unzipWith-cong : f ≗ g → unzipWith f ≗ unzipWith g
326- foldl-cong : (∀ x y → f x y ≡ g x y) → d ≡ e → foldl f d ≗ foldl g e
326+ foldl-cong : (∀ x y → f x y ≡ g x y) → ∀ x → foldl f x ≗ foldl g x
327327 alignWith-flip : alignWith f xs ys ≡ alignWith (f ∘ swap) ys xs
328328 alignWith-comm : f ∘ swap ≗ f → alignWith f xs ys ≡ alignWith f ys xs
329329 align-flip : align xs ys ≡ map swap (align ys xs)
Original file line number Diff line number Diff line change @@ -696,11 +696,10 @@ module _ {P : Pred A p} {f : A → A → A} where
696696------------------------------------------------------------------------
697697-- foldl
698698
699- foldl-cong : ∀ {f g : B → A → B} {d e : B} →
700- (∀ x y → f x y ≡ g x y) → d ≡ e →
701- foldl f d ≗ foldl g e
702- foldl-cong f≗g refl [] = refl
703- foldl-cong f≗g d≡e (x ∷ xs) rewrite d≡e = foldl-cong f≗g (f≗g _ x) xs
699+ foldl-cong : ∀ {f g : B → A → B} → (∀ x y → f x y ≡ g x y) →
700+ ∀ x → foldl f x ≗ foldl g x
701+ foldl-cong f≗g x [] = refl
702+ foldl-cong f≗g x (y ∷ xs) rewrite f≗g x y = foldl-cong f≗g _ xs
704703
705704foldl-++ : ∀ (f : A → B → A) x ys zs →
706705 foldl f x (ys ++ zs) ≡ foldl f (foldl f x ys) zs
You can’t perform that action at this time.
0 commit comments