proposition: Lemma andb_true_iff : forall b1 b2:bool, b1 && b2 = true <-> b1 = true /\ b2 = true.
proof: Proof. Admitted. Lemma orb_true_iff : forall b1 b2, b1 || b2 = true <-> b1 = true \/ b2 = true. Proof. Admitted. Theorem beq_nat_false_iff : forall x y : nat, beq_nat x y = false <-> x <> y. Proof. Admitted. Fixpoint beq_list {A : Type} (beq : A -> A -> bool) (l1 l2 : list A) : bool . Admitted. Lemma beq_list_true_iff : forall A (beq : A -> A -> bool), (forall a1 a2, beq a1 a2 = true <-> a1 = a2) -> forall l1 l2, beq_list beq l1 l2 = true <-> l1 = l2. Proof. Admitted. Fixpoint forallb {X : Type} (test : X -> bool) (l : list X) : bool := match l with | [] => true | x :: l' => andb (test x) (forallb test l') end. Theorem forallb_true_iff : forall X test (l : list X), forallb test l = true <-> All (fun x => test x = true) l. Proof. Admitted. Definition excluded_middle := forall P : Prop, P \/ ~ P. Theorem restricted_excluded_middle : forall P b, (P <-> b = true) -> P \/ ~ P. Proof. intros P [] H. - left. rewrite H. reflexivity. - right. rewrite H. intros contra. inversion contra. Qed.
imports: Tactics