| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- This module is DEPRECATED. |
| 5 |
-- Please use `Data.List.Relation.Binary.Sublist.Propositional.Slice` |
| 6 |
-- instead. |
| 7 |
------------------------------------------------------------------------ |
| 8 |
|
| 9 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 10 |
|
| 11 |
module Data.List.Relation.Binary.Sublist.Propositional.Disjoint |
| 12 |
{a} {A : Set a} where |
| 13 |
|
| 14 |
{-# WARNING_ON_IMPORT |
| 15 |
"Data.List.Relation.Binary.Sublist.Propositional.Disjoint was deprecated in v2.1. |
| 16 |
Use Data.List.Relation.Binary.Sublist.Propositional.Slice instead." |
| 17 |
#-} |
| 18 |
|
| 19 |
open import Data.List.Base using (List) |
| 20 |
open import Data.List.Relation.Binary.Sublist.Propositional using |
| 21 |
( _⊆_; _∷_; _∷ʳ_ |
| 22 |
; Disjoint; ⊆-disjoint-union; _∷ₙ_; _∷ₗ_; _∷ᵣ_ |
| 23 |
) |
| 24 |
import Data.List.Relation.Binary.Sublist.Propositional.Slice as SPSlice |
| 25 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) |
| 26 |
|
| 27 |
open SPSlice using (⊆-upper-bound-is-cospan; ⊆-upper-bound-cospan) |
| 28 |
|
| 29 |
-- For backward compatibility reexport these: |
| 30 |
open SPSlice public using ( IsCospan; Cospan ) |
| 31 |
|
| 32 |
open IsCospan |
| 33 |
open Cospan |
| 34 |
|
| 35 |
module _ |
| 36 |
{x : A} {xs ys zs : List A} {τ₁ : xs ⊆ zs} {τ₂ : ys ⊆ zs} |
| 37 |
(d : Disjoint τ₁ τ₂) (c : IsCospan (⊆-disjoint-union d)) where |
| 38 |
|
| 39 |
∷ₙ-cospan : IsCospan (⊆-disjoint-union (x ∷ₙ d)) |
| 40 |
∷ₙ-cospan = record |
| 41 |
{ tri₁ = cong (x ∷ʳ_) (c .tri₁) |
| 42 |
; tri₂ = cong (x ∷ʳ_) (c .tri₂) |
| 43 |
} |
| 44 |
|
| 45 |
∷ₗ-cospan : IsCospan (⊆-disjoint-union (refl {x = x} ∷ₗ d)) |
| 46 |
∷ₗ-cospan = record |
| 47 |
{ tri₁ = cong (refl ∷_) (c .tri₁) |
| 48 |
; tri₂ = cong (x ∷ʳ_) (c .tri₂) |
| 49 |
} |
| 50 |
|
| 51 |
∷ᵣ-cospan : IsCospan (⊆-disjoint-union (refl {x = x} ∷ᵣ d)) |
| 52 |
∷ᵣ-cospan = record |
| 53 |
{ tri₁ = cong (x ∷ʳ_) (c .tri₁) |
| 54 |
; tri₂ = cong (refl ∷_) (c .tri₂) |
| 55 |
} |
| 56 |
|
| 57 |
⊆-disjoint-union-is-cospan : ∀ {xs ys zs : List A} {τ₁ : xs ⊆ zs} {τ₂ : ys ⊆ zs} → |
| 58 |
(d : Disjoint τ₁ τ₂) → IsCospan (⊆-disjoint-union d) |
| 59 |
⊆-disjoint-union-is-cospan {τ₁ = τ₁} {τ₂ = τ₂} _ = ⊆-upper-bound-is-cospan τ₁ τ₂ |
| 60 |
|
| 61 |
⊆-disjoint-union-cospan : ∀ {xs ys zs : List A} {τ₁ : xs ⊆ zs} {τ₂ : ys ⊆ zs} → |
| 62 |
Disjoint τ₁ τ₂ → Cospan τ₁ τ₂ |
| 63 |
⊆-disjoint-union-cospan {τ₁ = τ₁} {τ₂ = τ₂} _ = ⊆-upper-bound-cospan τ₁ τ₂ |
| 64 |
|
| 65 |
{-# WARNING_ON_USAGE ⊆-disjoint-union-is-cospan |
| 66 |
"Warning: ⊆-disjoint-union-is-cospan was deprecated in v2.1. |
| 67 |
Please use `⊆-upper-bound-is-cospan` from `Data.List.Relation.Binary.Sublist.Propositional.Slice` instead." |
| 68 |
#-} |
| 69 |
|
| 70 |
{-# WARNING_ON_USAGE ⊆-disjoint-union-cospan |
| 71 |
"Warning: ⊆-disjoint-union-cospan was deprecated in v2.1. |
| 72 |
Please use `⊆-upper-bound-cospan` from `Data.List.Relation.Binary.Sublist.Propositional.Slice` instead." |
| 73 |
#-} |