@@ -20,7 +20,10 @@ import Data.List.Membership.Setoid as SetoidMembership
20
20
import Data.List.Properties as List
21
21
import Data.List.Relation.Binary.Equality.Setoid as ≋
22
22
open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_)
23
- open import Data.List.Relation.Binary.Subset.Propositional using (_⊆_)
23
+ import Data.List.Relation.Binary.Sublist.Propositional as Sublist
24
+ import Data.List.Relation.Binary.Sublist.Propositional.Properties
25
+ as Sublist
26
+ import Data.List.Relation.Binary.Subset.Propositional as Subset
24
27
open import Data.List.Relation.Unary.All as All using
25
28
( All; []; _∷_; lookup; updateAt
26
29
; _[_]=_; here; there
@@ -385,6 +388,11 @@ concat⁻ : ∀ {xss} → All P (concat xss) → All (All P) xss
385
388
concat⁻ {xss = []} [] = []
386
389
concat⁻ {xss = xs ∷ xss} pxs = ++⁻ˡ xs pxs ∷ concat⁻ (++⁻ʳ xs pxs)
387
390
391
+ all⊆concat : (xss : List (List A)) → All (Sublist._⊆ concat xss) xss
392
+ all⊆concat [] = []
393
+ all⊆concat (xs ∷ xss) =
394
+ Sublist.++⁺ʳ (concat xss) Sublist.⊆-refl ∷ All.map (Sublist.++⁺ˡ xs) (all⊆concat xss)
395
+
388
396
------------------------------------------------------------------------
389
397
-- snoc
390
398
@@ -675,10 +683,10 @@ module _ (p : A → Bool) where
675
683
------------------------------------------------------------------------
676
684
-- All is anti-monotone.
677
685
678
- anti-mono : xs ⊆ ys → All P ys → All P xs
686
+ anti-mono : xs Subset. ⊆ ys → All P ys → All P xs
679
687
anti-mono xs⊆ys pys = All.tabulate (lookup pys ∘ xs⊆ys)
680
688
681
- all-anti-mono : ∀ (p : A → Bool) → xs ⊆ ys → T (all p ys) → T (all p xs)
689
+ all-anti-mono : ∀ (p : A → Bool) → xs Subset. ⊆ ys → T (all p ys) → T (all p xs)
682
690
all-anti-mono p xs⊆ys = all⁻ p ∘ anti-mono xs⊆ys ∘ all⁺ p _
683
691
684
692
------------------------------------------------------------------------
0 commit comments