File tree 3 files changed +27
-0
lines changed
src/Data/Vec/Relation/Binary
3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -3080,6 +3080,16 @@ This is a full list of proofs that have changed form to use irrelevant instance
3080
3080
<-weakInduction-startingFrom : P i → (∀ j → P (inject₁ j) → P (suc j)) → ∀ {j} → j ≥ i → P j
3081
3081
```
3082
3082
3083
+ * Added new function to ` Data.Vec.Relation.Binary.Pointwise.Inductive `
3084
+ ``` agda
3085
+ cong-[_]≔ : Pointwise _∼_ xs ys → Pointwise _∼_ (xs [ i ]≔ p) (ys [ i ]≔ p)
3086
+ ```
3087
+
3088
+ * Added new function to ` Data.Vec.Relation.Binary.Equality.Setoid `
3089
+ ``` agda
3090
+ map-[]≔ : map f (xs [ i ]≔ p) ≋ map f xs [ i ]≔ f p
3091
+ ```
3092
+
3083
3093
* Added new function to ` Data.List.Relation.Binary.Permutation.Propositional.Properties `
3084
3094
``` agda
3085
3095
↭-reverse : (xs : List A) → reverse xs ↭ xs
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module Data.Vec.Relation.Binary.Equality.Setoid
12
12
{a ℓ} (S : Setoid a ℓ) where
13
13
14
14
open import Data.Nat.Base using (ℕ; zero; suc; _+_)
15
+ open import Data.Fin using (zero; suc)
15
16
open import Data.Vec.Base
16
17
open import Data.Vec.Relation.Binary.Pointwise.Inductive as PW
17
18
using (Pointwise)
@@ -79,6 +80,12 @@ map-++ : ∀ {b m n} {B : Set b}
79
80
map-++ f [] = ≋-refl
80
81
map-++ f (x ∷ xs) = refl ∷ map-++ f xs
81
82
83
+ map-[]≔ : ∀ {b n} {B : Set b}
84
+ (f : B → A) (xs : Vec B n) i p →
85
+ map f (xs [ i ]≔ p) ≋ map f xs [ i ]≔ f p
86
+ map-[]≔ f (x ∷ xs) zero p = refl ∷ ≋-refl
87
+ map-[]≔ f (x ∷ xs) (suc i) p = refl ∷ map-[]≔ f xs i p
88
+
82
89
------------------------------------------------------------------------
83
90
-- concat
84
91
Original file line number Diff line number Diff line change @@ -217,6 +217,16 @@ module _ {_∼_ : REL A B ℓ} where
217
217
tabulate⁻ (f₀∼g₀ ∷ _) zero = f₀∼g₀
218
218
tabulate⁻ (_ ∷ f∼g) (suc i) = tabulate⁻ f∼g i
219
219
220
+ ------------------------------------------------------------------------
221
+ -- cong
222
+
223
+ module _ {_∼_ : Rel A ℓ} (refl : Reflexive _∼_) where
224
+ cong-[_]≔ : ∀ {n} i p {xs} {ys} →
225
+ Pointwise _∼_ {n} xs ys →
226
+ Pointwise _∼_ (xs [ i ]≔ p) (ys [ i ]≔ p)
227
+ cong-[ zero ]≔ p (_ ∷ eqn) = refl ∷ eqn
228
+ cong-[ suc i ]≔ p (x∼y ∷ eqn) = x∼y ∷ cong-[ i ]≔ p eqn
229
+
220
230
------------------------------------------------------------------------
221
231
-- Degenerate pointwise relations
222
232
You can’t perform that action at this time.
0 commit comments