@@ -26,7 +26,7 @@ open import Relation.Nullary hiding (Irrelevant)
26
26
import Relation.Nullary.Decidable as Dec using (map′)
27
27
open import Relation.Unary as U using (Pred)
28
28
open import Relation.Binary.Core renaming (Rel to Rel₂)
29
- open import Relation.Binary.Definitions using (_Respects_; _Respects₂_)
29
+ open import Relation.Binary.Definitions using (Reflexive; _Respects_; _Respects₂_)
30
30
open import Relation.Binary.Bundles using (Setoid; DecSetoid; Preorder; Poset)
31
31
open import Relation.Binary.Structures using (IsEquivalence; IsDecEquivalence; IsPartialOrder; IsPreorder)
32
32
open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_)
@@ -166,6 +166,15 @@ tabulate⁻ {n = suc n} (x∼y ∷ xs∼ys) (fsuc i) = tabulate⁻ xs∼ys i
166
166
++-cancelʳ {xs = xs} (y ∷ ys) [] eq =
167
167
contradiction (≡.trans (≡.sym (length-++ (y ∷ ys))) (Pointwise-length eq)) (m≢1+n+m (length xs) ∘ ≡.sym)
168
168
169
+ module _ (rfl : Reflexive R) where
170
+
171
+ ++⁺ʳ : ∀ xs → Pointwise R ys zs → Pointwise R (xs ++ ys) (xs ++ zs)
172
+ ++⁺ʳ xs = ++⁺ (refl rfl)
173
+
174
+ ++⁺ˡ : Pointwise R ws xs → ∀ zs → Pointwise R (ws ++ zs) (xs ++ zs)
175
+ ++⁺ˡ rs zs = ++⁺ rs (refl rfl)
176
+
177
+
169
178
------------------------------------------------------------------------
170
179
-- concat
171
180
@@ -261,8 +270,7 @@ lookup⁺ (_ ∷ Rxys) (fsuc i) = lookup⁺ Rxys i
261
270
262
271
Pointwise-≡⇒≡ : Pointwise {A = A} _≡_ ⇒ _≡_
263
272
Pointwise-≡⇒≡ [] = ≡.refl
264
- Pointwise-≡⇒≡ (≡.refl ∷ xs∼ys) with Pointwise-≡⇒≡ xs∼ys
265
- ... | ≡.refl = ≡.refl
273
+ Pointwise-≡⇒≡ (≡.refl ∷ xs∼ys) = ≡.cong (_ ∷_) (Pointwise-≡⇒≡ xs∼ys)
266
274
267
275
≡⇒Pointwise-≡ : _≡_ ⇒ Pointwise {A = A} _≡_
268
276
≡⇒Pointwise-≡ ≡.refl = refl ≡.refl
0 commit comments