@@ -1163,13 +1163,13 @@ module _ {P : Pred A p} (P? : Decidable P) where
11631163 filter-all : ∀ {xs} → All P xs → filter P? xs ≡ xs
11641164 filter-all {[]} [] = refl
11651165 filter-all {x ∷ xs} (px ∷ pxs) with P? x
1166- ... | false because [ ¬px] = contradiction px (invert [ ¬px])
1167- ... | true because _ = cong (x ∷_) (filter-all pxs)
1166+ ... | no ¬px = contradiction px ¬px
1167+ ... | true because _ = cong (x ∷_) (filter-all pxs)
11681168
11691169 filter-notAll : ∀ xs → Any (∁ P) xs → length (filter P? xs) < length xs
11701170 filter-notAll (x ∷ xs) (here ¬px) with P? x
1171- ... | false because _ = s≤s (length-filter xs)
1172- ... | true because [px] = contradiction (invert [px]) ¬px
1171+ ... | false because _ = s≤s (length-filter xs)
1172+ ... | yes px = contradiction px ¬px
11731173 filter-notAll (x ∷ xs) (there any) with ih ← filter-notAll xs any | does (P? x)
11741174 ... | false = m≤n⇒m≤1+n ih
11751175 ... | true = s≤s ih
@@ -1185,8 +1185,8 @@ module _ {P : Pred A p} (P? : Decidable P) where
11851185 filter-none : ∀ {xs} → All (∁ P) xs → filter P? xs ≡ []
11861186 filter-none {[]} [] = refl
11871187 filter-none {x ∷ xs} (¬px ∷ ¬pxs) with P? x
1188- ... | false because _ = filter-none ¬pxs
1189- ... | true because [px] = contradiction (invert [px]) ¬px
1188+ ... | false because _ = filter-none ¬pxs
1189+ ... | yes px = contradiction px ¬px
11901190
11911191 filter-complete : ∀ {xs} → length (filter P? xs) ≡ length xs →
11921192 filter P? xs ≡ xs
@@ -1197,13 +1197,13 @@ module _ {P : Pred A p} (P? : Decidable P) where
11971197
11981198 filter-accept : ∀ {x xs} → P x → filter P? (x ∷ xs) ≡ x ∷ (filter P? xs)
11991199 filter-accept {x} Px with P? x
1200- ... | true because _ = refl
1201- ... | false because [ ¬Px] = contradiction Px (invert [ ¬Px])
1200+ ... | true because _ = refl
1201+ ... | no ¬Px = contradiction Px ¬Px
12021202
12031203 filter-reject : ∀ {x xs} → ¬ P x → filter P? (x ∷ xs) ≡ filter P? xs
12041204 filter-reject {x} ¬Px with P? x
1205- ... | true because [Px] = contradiction (invert [Px]) ¬Px
1206- ... | false because _ = refl
1205+ ... | yes Px = contradiction Px ¬Px
1206+ ... | false because _ = refl
12071207
12081208 filter-idem : filter P? ∘ filter P? ≗ filter P?
12091209 filter-idem [] = refl
@@ -1241,13 +1241,13 @@ module _ {R : Rel A p} (R? : B.Decidable R) where
12411241
12421242 derun-reject : ∀ {x y} xs → R x y → derun R? (x ∷ y ∷ xs) ≡ derun R? (y ∷ xs)
12431243 derun-reject {x} {y} xs Rxy with R? x y
1244- ... | true because _ = refl
1245- ... | false because [ ¬Rxy] = contradiction Rxy (invert [ ¬Rxy])
1244+ ... | yes _ = refl
1245+ ... | no ¬Rxy = contradiction Rxy ¬Rxy
12461246
12471247 derun-accept : ∀ {x y} xs → ¬ R x y → derun R? (x ∷ y ∷ xs) ≡ x ∷ derun R? (y ∷ xs)
12481248 derun-accept {x} {y} xs ¬Rxy with R? x y
1249- ... | true because [ Rxy] = contradiction (invert [ Rxy]) ¬Rxy
1250- ... | false because _ = refl
1249+ ... | yes Rxy = contradiction Rxy ¬Rxy
1250+ ... | no _ = refl
12511251
12521252------------------------------------------------------------------------
12531253-- partition
@@ -1260,7 +1260,7 @@ module _ {P : Pred A p} (P? : Decidable P) where
12601260 ... | true = cong (Product.map (x ∷_) id) ih
12611261 ... | false = cong (Product.map id (x ∷_)) ih
12621262
1263- length-partition : ∀ xs → (let ys , zs = partition P? xs) →
1263+ length-partition : ∀ xs → (let ( ys , zs) = partition P? xs) →
12641264 length ys ≤ length xs × length zs ≤ length xs
12651265 length-partition [] = z≤n , z≤n
12661266 length-partition (x ∷ xs) with ih ← length-partition xs | does (P? x)
0 commit comments