Skip to content

Commit 52faa1d

Browse files
committed
Vec.Properties: introduce ≈-cong′
1 parent 606bea8 commit 52faa1d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Data/Vec/Properties.agda

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,12 @@ cast-sym eq {xs = x ∷ xs} {ys = y ∷ ys} xxs[eq]≡yys =
381381
let x≡y , xs[eq]≡ys = ∷-injective xxs[eq]≡yys
382382
in cong₂ _∷_ (sym x≡y) (cast-sym (suc-injective eq) xs[eq]≡ys)
383383

384+
≈-cong′ : {f-len : ℕ} (f : {n} Vec A n Vec B (f-len n))
385+
{xs : Vec A m} {ys : Vec A n} .{eq} xs ≈[ eq ] ys
386+
f xs ≈[ cong f-len eq ] f ys
387+
≈-cong′ f {xs = []} {ys = []} refl = cast-is-id refl (f [])
388+
≈-cong′ f {xs = x ∷ xs} {ys = y ∷ ys} refl = ≈-cong′ (f ∘ (x ∷_)) refl
389+
384390
------------------------------------------------------------------------
385391
-- map
386392

0 commit comments

Comments
 (0)