Conversation
|
This feels like a consequence of |
Fairbairn threshold? |
|
This composes better if you're using nested Compare: foo : ∀ {a ℓ m n} {A : Set a} {P : Rel A ℓ} → Antisymmetric _≡_ P → Antisymmetric _≡_ (Pointwise (Pointwise P {n}) {m})
foo antisym = Pointwise.antisym-≡ (Pointwise.antisym-≡ antisym)
bar : ∀ {a ℓ m n} {A : Set a} {P : Rel A ℓ} → Antisymmetric _≡_ P → Antisymmetric _≡_ (Pointwise (Pointwise P {n}) {m})
bar antisym a b = Pointwise.Pointwise-≡⇒≡ (Pointwise.antisym (λ c d → Pointwise.Pointwise-≡⇒≡ (Pointwise.antisym antisym c d)) a b)That said, I realised as I was writing that that the lambdas were unnecessary with baz : ∀ {a ℓ m n} {A : Set a} {P : Rel A ℓ} → Antisymmetric _≡_ P → Antisymmetric _≡_ (Pointwise (Pointwise P {n}) {m})
baz antisym = Pointwise.Pointwise-≡⇒≡ ∘₂ Pointwise.antisym (Pointwise.Pointwise-≡⇒≡ ∘₂ Pointwise.antisym antisym)But while that's a better way to do this than what I was doing, I still think adding this is worth it. I initially implemented this directly to avoid reordering the module. |
|
I think that moving code is always OK, so long as the dependency order is respected, and I certainly agree with wanting the keep any definition of As for Fairbairn, for sure I felt obliged to raise the question, but I'd be OK with adding this lemma. |
By analogy to what exists in, for example,
Relation.Binary.Construct.Add.Infimum.NonStrict.Something similar could also be added to
Data.Vec.Relation.Binary.Pointwise.Extensional