Module Type Version1.
Inductive comes_from_the_left (P Q:Prop): P \/ Q -> Prop :=
c1 : forall p, comes_from_the_left P Q (or_introl (A:=P) Q p).
Goal (comes_from_the_left _ _ (or_introl True I)).
split.
Qed.
Goal ~(comes_from_the_left _ _ (or_intror True I)).
red;inversion 1.
(* discriminate H0. *)
Abort.
End Version1.
Fail Definition comes_from_the_left (P Q:Prop)(H:P \/ Q): Prop :=
match H with
|  or_introl p => True
|  or_intror q => False
end.
(* Error: Incorrect elimination of "H" in the inductive type "or", the return type has sort "Type" while it should be "Prop"  Elimination of an inductive object of sort "Prop" is not allowed on a predicate in sort "Type" because proofs can be eliminated only to build proofs *)
Definition comes_from_the_left_sumbool
(P Q:Prop)(x:{P}+{Q}): Prop :=
match x with
|  left  p => True
|  right q => False
end.
Close Scope Z_scope.
Set Nested Proofs Allowed.
Definition Is_zero (x:nat):= match x with
| 0 => True
| _ => False
end.
red; intros n Hn.
apply O_is_zero with (m := S n).
assumption.
Qed.

Theorem disc2 : forall n, S (S n) <> 1.