see http://qiita.com/yoshihiro503/items/730eba53797de7a23328
This file contains hidden or 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. | |
Definition x : {n | n > 0}. | |
Proof. | |
refine (@exist nat (fun n => n > 0) 10 _). | |
auto 10. | |
auto with arith. | |
Defined. |
This file contains hidden or 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
Lemma edivnP_right : forall m d, edivn_spec_right m d (edivn m d). | |
Proof. | |
Check edivnP. | |
move=> m d. | |
case: (edivnP m d) => q r eq_m_dqr impl_0d_rd. | |
by apply: EdivnSpec_right. | |
Qed. |
This file contains hidden or 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
Lemma edivnP_left : forall m d, edivn_spec_left m d (edivn m d). | |
Proof. | |
move=> m d. | |
case: (edivnP m d) => q r eq impl. | |
by apply EdivnSpec_left. | |
Qed. |
This file contains hidden or 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
-R . | |
bigop2_example.v | |
group_example.v | |
predicative_example.v | |
bigop_example.v | |
ssrbool_example.v | |
dependent_example.v | |
logic_example.v | |
ssrnat_example.v | |
eqtype_example.v |
This file contains hidden or 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
Lemma exo4 : False \/ True. | |
Proof. | |
right. exact I. | |
Qed. |
This file contains hidden or 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
-R src JapaneseCoqdocSampleProject | |
src/Hoge.v | |
src/Piyo.v | |
-custom "platex Proof.tex; platex Proof.tex" "Proof.tex $(VOFILES) $(VFILES:.v=.tex)" "Proof.dvi" | |
-custom "dvipdfmx Proof.dvi" "Proof.dvi" Proof.pdf |
This file contains hidden or 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
let '(x, y, z) := (1, 2, 3) in | |
... |
This file contains hidden or 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 foo (b : bool) : nat = | |
if b then 0 else 1. |
This file contains hidden or 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 Program Arith. | |
(** * リストモジュールの拡張 *) | |
Module List. | |
Require Export List. | |
Fixpoint _index_of_loop {A:Type} (eq_dec : forall (x y:A),{x=y}+{x<>y}) a xs i := | |
match xs with | |
| nil => None | |
| x::xs => if eq_dec x a then Some i else _index_of_loop eq_dec a xs (S i) |