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.

Theorem S_is_not_O : forall n, S n <> 0.