Skip to content

Instantly share code, notes, and snippets.

@soonhokong
soonhokong / how_to_copy_between_repos.md
Last active August 29, 2015 14:01
how do we copy files between repositories without losing the history?

Scenario

  • We want to move all files under library/hott in leanprover/library repo to src/library/hott in leanprover/lean repo.
  • We want to preserve the commit history of leanprover/library during the migration.

Solution

I assume that leanprover/lean repo is already cloned at ~/work/lean.

@soonhokong
soonhokong / How_we_take_photos_at_GHC9232.md
Last active August 29, 2015 14:01
How we take photos at GHC9232

takeshot.sh

We are using imagesnap program to take a photo from command-line. On OSX, you can install it via homebrew.

#!/usr/bin/env bash
@soonhokong
soonhokong / .gitconfig.md
Last active August 29, 2015 14:01
.gitconfig
[apply]
  whitespace = nowarn

[core]
        whitespace = trailing-space, space-before-tab
        autocrlf = input

[alias]
  a = "add"
@soonhokong
soonhokong / init.el
Last active September 14, 2020 06:01
Emacs Configuration for Windows
;; Package
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(package-refresh-contents)
;; Install required/optional packages for lean-mode
(defvar lean-mode-required-packages
'(company dash dash-functional flycheck whitespace-cleanup-mode
@soonhokong
soonhokong / nt_compose.lean
Last active August 29, 2015 14:08
Composition of Natural Transformation
import algebra.category.functor
open category eq eq.ops functor
inductive natural_transformation {C D : Category} (F G : C ⇒ D) : Type :=
mk : Π (η : Π(a : C), hom (F a) (G a)), (Π{a b : C} (f : hom a b), G f ∘ η a = η b ∘ F f)
→ natural_transformation F G
infixl `⟹`:25 := natural_transformation -- \==>
namespace natural_transformation
@soonhokong
soonhokong / small_exercises.lean
Created October 29, 2014 15:37
Small Exercises
-- Theorems/Exercises from "Logical Investigations, with the Nuprl Proof Assistant"
-- by Robert L. Constable and Anne Trostle
-- http://www.nuprl.org/MathLibrary/LogicalInvestigations/
import logic
-- 2. The Minimal Implicational Calculus
theorem thm1 {A B : Prop} : A → B → A :=
assume Ha Hb, Ha
theorem thm2 {A B C : Prop} : (A → B) → (A → B → C) → (A → C) :=
@soonhokong
soonhokong / emacs-travis.sh
Created October 30, 2014 02:50
Emacs-Travis
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
@soonhokong
soonhokong / travis.sh
Last active August 29, 2015 14:08 — forked from rejeep/travis.sh
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
#! /usr/bin/env bash
# Author: Damien Cassou
#
# This is the script I use to build Emacs packages for Ubuntu. These
# packages are uploaded to
# https://launchpad.net/~cassou/+archive/emacs/. Each package is
# either build from a Debian package or from
# http://emacs.naquadah.org/.
@soonhokong
soonhokong / capd-poincare.md
Last active August 29, 2015 14:10
CAPD4-PoincareSection-Example

Code from CAPD Author

#include <iostream>
#include "capd/capdlib.h"
using namespace std;
using namespace capd;

int main(){
  cout.precision(17);