@@ -13,8 +13,7 @@ open import Data.Bool.Properties using (T-∨; T-≡)
1313open import Data.Empty using (⊥)
1414open import Data.Fin.Base using (Fin; zero; suc)
1515open import Data.List.Base as List hiding (find)
16- open import Data.List.Properties using (ʳ++-defn)
17- open import Data.List.Effectful as Listₑ using (monad)
16+ open import Data.List.Effectful as List using (monad)
1817open import Data.List.Relation.Unary.Any as Any using (Any; here; there)
1918open import Data.List.Membership.Propositional
2019open import Data.List.Membership.Propositional.Properties.Core
@@ -624,18 +623,16 @@ reverseAcc⁺ acc (x ∷ xs) (inj₂ (there y)) = reverseAcc⁺ (x ∷ acc) xs (
624623
625624reverseAcc⁻ : ∀ acc xs → Any P (reverseAcc acc xs) → Any P acc ⊎ Any P xs
626625reverseAcc⁻ acc [] ps = inj₁ ps
627- reverseAcc⁻ acc (x ∷ xs) ps rewrite ʳ++-defn xs {x ∷ acc} with ++⁻ (reverseAcc [] xs) ps
628- ... | inj₂ (here p') = inj₂ (here p')
629- ... | inj₂ (there ps') = inj₁ ps'
630- ... | inj₁ ps' with reverseAcc⁻ [] xs ps'
631- ... | inj₂ ps'' = inj₂ (there ps'')
626+ reverseAcc⁻ acc (x ∷ xs) ps with reverseAcc⁻ (x ∷ acc) xs ps
627+ ... | inj₁ (here px) = inj₂ (here px)
628+ ... | inj₁ (there pxs) = inj₁ pxs
629+ ... | inj₂ pxs = inj₂ (there pxs)
632630
633631reverse⁺ : Any P xs → Any P (reverse xs)
634632reverse⁺ ps = reverseAcc⁺ [] _ (inj₂ ps)
635633
636634reverse⁻ : Any P (reverse xs) → Any P xs
637- reverse⁻ ps with reverseAcc⁻ [] _ ps
638- ... | inj₂ ps' = ps'
635+ reverse⁻ ps with inj₂ pxs ← reverseAcc⁻ [] _ ps = pxs
639636
640637------------------------------------------------------------------------
641638-- pure
@@ -686,7 +683,7 @@ module _ {A B : Set ℓ} {P : B → Set p} {f : A → List B} where
686683 Any (λ f → Any (P ∘ f) xs) fs ↔⟨ Any-cong (λ _ → Any-cong (λ _ → pure↔) (_ ∎)) (_ ∎) ⟩
687684 Any (λ f → Any (Any P ∘ pure ∘ f) xs) fs ↔⟨ Any-cong (λ _ → >>=↔ ) (_ ∎) ⟩
688685 Any (λ f → Any P (xs >>= pure ∘ f)) fs ↔⟨ >>=↔ ⟩
689- Any P (fs >>= λ f → xs >>= λ x → pure (f x)) ≡⟨ cong (Any P) (Listₑ .Applicative.unfold-⊛ fs xs) ⟨
686+ Any P (fs >>= λ f → xs >>= λ x → pure (f x)) ≡⟨ cong (Any P) (List .Applicative.unfold-⊛ fs xs) ⟨
690687 Any P (fs ⊛ xs) ∎
691688 where open Related.EquationalReasoning
692689
@@ -706,7 +703,7 @@ module _ {A B : Set ℓ} {P : B → Set p} {f : A → List B} where
706703 Any (λ x → Any (λ y → P (x , y)) ys) xs ↔⟨ pure↔ ⟩
707704 Any (λ _,_ → Any (λ x → Any (λ y → P (x , y)) ys) xs) (pure _,_) ↔⟨ ⊛↔ ⟩
708705 Any (λ x, → Any (P ∘ x,) ys) (pure _,_ ⊛ xs) ↔⟨ ⊛↔ ⟩
709- Any P (pure _,_ ⊛ xs ⊛ ys) ≡⟨ cong (Any P ∘′ (_⊛ ys)) (Listₑ .Applicative.unfold-<$> _,_ xs) ⟨
706+ Any P (pure _,_ ⊛ xs ⊛ ys) ≡⟨ cong (Any P ∘′ (_⊛ ys)) (List .Applicative.unfold-<$> _,_ xs) ⟨
710707 Any P (xs ⊗ ys) ∎
711708 where open Related.EquationalReasoning
712709
0 commit comments