File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/Data/List/Relation/Unary/First Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -417,3 +417,9 @@ Additions to existing modules
417
417
does-≐ : P ≐ Q → (P? : Decidable P) → (Q? : Decidable Q) → does ∘ P? ≗ does ∘ Q?
418
418
does-≡ : (P? P?′ : Decidable P) → does ∘ P? ≗ does ∘ P?′
419
419
```
420
+
421
+ * In ` Data.List.Relation.Unary.First.Properties ` :
422
+ ``` agda
423
+ ¬First⇒All : ∁ Q ⊆ P → ∁ (First P Q) ⊆ All P
424
+ ```
425
+
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ module _ {a p q} {A : Set a} {P : Pred A p} {Q : Pred A q} where
59
59
First⇒¬All q⇒¬p [ qx ] (px ∷ pxs) = q⇒¬p qx px
60
60
First⇒¬All q⇒¬p (_ ∷ pqxs) (_ ∷ pxs) = First⇒¬All q⇒¬p pqxs pxs
61
61
62
+ ¬First⇒All : ∁ Q ⊆ P → ∁ (First P Q) ⊆ All P
63
+ ¬First⇒All ¬q⇒p {[]} _ = []
64
+ ¬First⇒All ¬q⇒p {x ∷ xs} ¬pqxxs =
65
+ let px = ¬q⇒p (¬pqxxs ∘ [_]) in
66
+ px ∷ ¬First⇒All ¬q⇒p (¬pqxxs ∘ (px ∷_))
67
+
62
68
------------------------------------------------------------------------
63
69
-- Irrelevance
64
70
You can’t perform that action at this time.
0 commit comments