This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Theorem tautology : forall P : Prop, P -> P. | |
Proof. | |
intros P H. | |
assumption. | |
Qed. | |
Theorem Modus_ponens : forall P Q : Prop, P -> (P -> Q) -> Q. | |
Proof. | |
intros. | |
apply H0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Arith. | |
Goal forall x y, x < y -> x + 10 < y + 10. | |
Proof. | |
intros. | |
apply plus_lt_compat_r. | |
apply H. | |
Qed. | |
Goal forall P Q : nat -> Prop, P 0 -> (forall x, P x -> Q x) -> Q 0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Arith. | |
Require Import Arith Ring. | |
Fixpoint sum_odd(n:nat) : nat := | |
match n with | |
| O => O | |
| S m => 1 + m + m + sum_odd m | |
end. | |
Goal forall n, sum_odd n = n * n. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Definition tautology : forall P : Prop, P -> P | |
:= fun p => fun p => p. | |
Definition Modus_tollens : forall P Q : Prop, ~Q /\ (P -> Q) -> ~P | |
:= fun p q (H : ~ q /\ (p -> q)) ( H0 : p) => | |
match H with | |
| conj H1 H2 => H1 (H2 H0) | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameter A : Set. | |
Definition Eq : A -> A -> Prop := | |
fun p q => p = q. | |
Lemma Eq_eq : forall x y, Eq x y <-> x = y. | |
Proof. | |
intros. | |
unfold Eq. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* 必要な公理を入れる *) | |
Require Import Coq.Logic.Classical. | |
Lemma ABC_iff_iff : | |
forall A B C : Prop, ((A <-> B) <-> C) <-> (A <-> (B <-> C)). | |
Proof. | |
intros. | |
tauto. | |
Qed. | |
(* 必要な公理を入れる *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameter A : Set. | |
Definition Eq : A -> A -> Prop := | |
fun p q => (forall a: A-> Prop, a p <-> a q). | |
Lemma Eq_eq : forall x y, Eq x y <-> x = y. | |
Proof. | |
intros. | |
unfold Eq. | |
unfold iff. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* 必要な公理を入れる*) | |
Require Import Coq.Logic.Classical. | |
Lemma ABC_iff_iff : | |
forall A B C : Prop, ((A <-> B) <-> C) <-> (A <-> (B <-> C)). | |
Proof. | |
intros. | |
tauto. | |
Qed. | |
(* 必要な公理を入れる *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Arith. | |
Goal (221 * 293 * 389 * 397 + 17 = 14 * 119 * 127 * 151 * 313)%nat. | |
Proof. | |
ring. | |
Qed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import ZArith. | |
Lemma hoge : forall z : Z, (z ^ 4 - 4 * z ^ 2 + 4 > 0)%Z. | |
Proof. | |
intros. | |
assert (((z ^ 2 - 2)<>0)%Z -> (((z ^ 2 - 2)^2) > 0) % Z). | |
intro. | |
assert (forall p : Z, ((p<>0)%Z -> (p ^ 2 > 0) % Z)). | |
intro. |
OlderNewer