4
4

1 回答 1

6

The data type constructors are disjoint. I'd say it's a theorem in Agda's type-system meta-theory.

You can try to case the eq proof (C-c C-c), and Agda will find the contradiction:

lemma : ∀ {a b} {A : Set a} {B : Set b} {x : A} {y : B} → ¬ inj₁ x ≡ inj₂ y
lemma ()

This happily type-checks.

于 2015-01-31T11:35:06.587 回答