Pairwise R as
means that all the elements of the array as
are R
-related to all elements with
larger indices.
Pairwise R #[1, 2, 3] ↔ R 1 2 ∧ R 1 3 ∧ R 2 3
For example as.Pairwise (· ≠ ·)
asserts that as
has no duplicates, as.Pairwise (· < ·)
asserts
that as
is strictly sorted and as.Pairwise (· ≤ ·)
asserts that as
is weakly sorted.
Equations
- Array.Pairwise R as = List.Pairwise R as.toList
Instances For
instance
Array.instDecidablePairwiseOfDecidableRel
{α : Type u_1}
(R : α → α → Prop)
[DecidableRel R]
(as : Array α)
:
Equations
- Array.instDecidablePairwiseOfDecidableRel R as = decidable_of_iff (∀ (j : Fin as.size) (i : Fin ↑j), R as[↑i] as[↑j]) ⋯