Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************)
(*         *   The Coq Proof Assistant / The Coq Development Team       *)
(*  v      *   INRIA, CNRS and contributors - Copyright 1999-2018       *)
(* <O___,, *       (see CREDITS file for the list of authors)           *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)

Require Import Bool.

Inductive IfProp (A B:Prop) : bool -> Prop :=
  | Iftrue : A -> IfProp A B true
  | Iffalse : B -> IfProp A B false.

Hint Resolve Iftrue Iffalse: bool.


forall (A B : Prop) (b : bool), IfProp A B b -> b = true -> A
A, B:Prop
H:B
H0:false = true

A
case diff_true_false; auto with bool. Qed.

forall (A B : Prop) (b : bool), IfProp A B b -> b = false -> B
A, B:Prop
H:A
H0:true = false

B
case diff_true_false; trivial with bool. Qed.

forall A B : Prop, IfProp A B true -> A
A, B:Prop
H:IfProp A B true

A
A, B:Prop
H:IfProp A B true
H0:A

A
assumption. Qed.

forall A B : Prop, IfProp A B false -> B
A, B:Prop
H:IfProp A B false

B
A, B:Prop
H:IfProp A B false
H0:B

B
assumption. Qed.

forall (A B : Prop) (b : bool), IfProp A B b -> A \/ B
destruct 1; auto with bool. Qed.

forall (A B : Prop) (b : bool), IfProp A B b -> {A} + {B}
A, B:Prop
H:IfProp A B true

{A} + {B}
A, B:Prop
H:IfProp A B false
{A} + {B}
A, B:Prop
H:IfProp A B true

{A} + {B}
left; inversion H; auto with bool.
A, B:Prop
H:IfProp A B false

{A} + {B}
right; inversion H; auto with bool. Qed.