Skip to content

Adding an (existentially quantified) sublist #556

@ajrouvoet

Description

@ajrouvoet

We have Sublist.Inductive to relationally define what xs are sublists/OPEs of a given ys.
It seems useful to me to actually define a notion Sublist ys to existentially quantify over the xs, with definitions:

  ⊤ : ∀ {l} → Sublist l
  ⊥ : ∀ {l} → Sublist l
  Empty : ∀ {l} → Sublist l → Set a
  _∪_ : ∀ {l} → (xs ys : Sublist l) → Sublist l
  _∩_ : ∀ {l} → (xs ys : Sublist l) → Sublist l

This is completely analogue to the notion Fin.Subset n for natural numbers.

I have these definitions sitting in a branch here.
I would like some input on:

  • Where should this be defined?
  • Equality of a sublist to ⊤ appears hard to prove in practice. Proving that the reification of a sublist of xs is equal to xs seems more practical. This begs for the definition of Every as a counterpart to Empty.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions