Require Import Arith. Theorem context_examples: forall (A B C D E F:Prop), A -> B -> C -> D -> E -> F -> A. Proof. intro. intro P. intros Q R. intros until F. intros. revert H. revert F H4. revert R H2. rename E into HELLO. intros. clear Q HELLO H3 H1. assert (H1: 1+1=2). reflexivity. (* exact H. *) assumption. Qed. Theorem apply_example: forall (A B C:Prop), (A -> B) -> (B -> C) -> A -> C. Proof. intros. apply H0. apply H. assumption. (* apply H in H1. apply H0 in H1. assumption. *) Qed. Theorem apply_example2: forall (A:Prop), (forall (B:Prop), B -> A) -> A. Proof. intros. apply H with (B := True). reflexivity. Qed. Theorem search_example: forall (n:nat), 0 < n -> n < n+n. Proof. intros. Search nat. Search (_ < _+_). apply Nat.lt_add_pos_r. exact H. Qed. Theorem plus_0n_n0: forall (n:nat), 0+n = n+0. Proof. intro. simpl. Print "+". unfold "+". fold Nat.add. rewrite Nat.add_comm. Check Nat.add_comm. reflexivity. Qed. Theorem equality_examples: forall (m n:nat), m+1 = n+1 -> m=n. Proof. intros. symmetry. symmetry in H. transitivity (n+n-m). rewrite Nat.add_comm in H. simpl in H. rewrite Nat.add_comm in H. simpl in H. injection H. intro. subst. remember (m+m) as hello. Admitted.