Skip to content

Add Data.List.Relation.Interleaving #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gallais opened this issue Sep 15, 2018 · 1 comment
Closed

Add Data.List.Relation.Interleaving #466

gallais opened this issue Sep 15, 2018 · 1 comment
Milestone

Comments

@gallais
Copy link
Member

gallais commented Sep 15, 2018

This is a generalization of the idea that a list is split into two sublists in an order-respecting
way. The core definition is as follows. As usual we should have specialized versions for
Setoid & PropositionalEquality.

open import Relation.Binary

module Interleaving {a b l r} {A : Set a} {B : Set b} (L : REL A B l) (R : REL A B r) where

open import Data.List.Base

infix 3 _≣_⨝_
data _≣_⨝_ : List A  List B  List B  Set r where
  []   : [] ≣ [] ⨝ []
  _ˡ∷_ :  {a as b l r}  L a b  as ≣ l ⨝ r  a ∷ as ≣ b ∷ l ⨝ r
  _ʳ∷_ :  {a as l b r}  R a b  as ≣ l ⨝ r  a ∷ as ≣ l ⨝ b ∷ r

This thing has interesting interactions with OPEs e.g.

split : xs' ⊆ xs  xs ≣ us ⨝ vs λ us' λ vs'  xs' ≣ us' ⨝ vs' × us' ⊆ us × vs' ⊆ vs
gallais added a commit that referenced this issue Sep 17, 2018
I have changed my mind and called it `Split` because the List being
broken down is the first argument of the relation.
@MatthewDaggitt MatthewDaggitt added this to the v0.18 milestone Dec 24, 2018
@MatthewDaggitt
Copy link
Contributor

Closed with ab43a34

@MatthewDaggitt MatthewDaggitt modified the milestones: v0.18, v1.0 Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants