Skip to content

Instantly share code, notes, and snippets.

View KeenS's full-sized avatar

κeen KeenS

View GitHub Profile
$ cim for alisp ccl clisp ecl gcl sbcl do -qe '(print (expt 1.01 365))'
>>>alisp -qe (print (expt 1.01 365))
37.783386 ; Exiting
<<<
>>>ccl -qe (print (expt 1.01 365))
37.783386
<<<
>>>clisp -qe (print (expt 1.01 365))
@KeenS
KeenS / cl21 libs
Last active August 29, 2015 13:56
range
datetime (date & time)
set
sortedset
queue
tree (btree)
regexp
format scanner
lazy
copy
Theorem Modus_ponens : forall P Q : Prop, P -> (P -> Q) -> Q.
Proof.
intros.
apply H0.
assumption.
Qed.
Theorem Modus_tollens : forall P Q : Prop, ~Q /\ (P -> Q) -> ~P.
Proof.
intros.
destruct H.
intro.
apply H.
apply H0.
apply H1.
Qed.
Theorem Disjunctive_syllogism : forall P Q : Prop, (P \/ Q) -> ~P -> Q.
Proof.
intros.
destruct H.
destruct H0.
apply H.
apply H.
Qed.
Theorem DeBolran1 : forall P Q : Prop, ~P \/ ~Q -> ~(P /\ Q).
Proof.
intros.
destruct H.
intro.
destruct H0.
apply H, H0.
intro.
destruct H.
destruct H0.
Lemma NotNot : forall P : Prop, P -> ~~P.
Proof.
intros.
unfold not.
intros.
apply H0.
apply H.
Qed.
Require Import Classical.
Theorem DeMorgan3 : forall P Q : Prop, ~(P \/ Q) -> ~P /\ ~Q.
Proof.
intros.
split.
intro.
destruct H.
left.
apply H0.
intro.
destruct H.
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.
Proof.
intros.
apply H0.
apply H.
Qed.
Goal forall P : nat -> Prop, P 2 -> (exists y, P (1 + y)).
Proof.
intros.