Skip to content

Instantly share code, notes, and snippets.

View jcommelin's full-sized avatar

Johan Commelin jcommelin

View GitHub Profile
@jcommelin
jcommelin / subst.py
Created October 9, 2018 12:11
Apply replacement script on file
#!/bin/python3
### Read a replacement script from stdin
### Read a filename from commandline args
### Output to stdout
### Replacement script has the following form
# ----eofmarker
# line:col:line:col
@jcommelin
jcommelin / eckmann_hilton.lean
Last active August 23, 2024 18:57
Eckmann–Hilton in Lean
-- Written by Johan Commelin; golfed by Kenny Lau
import tactic.interactive
universe u
namespace eckmann_hilton
variables (X : Type u)
local notation a `<`m`>` b := @has_mul.mul X m a b
@jcommelin
jcommelin / witt_vector.lean
Created July 24, 2018 14:51
start on witt vectors
import data.nat.prime
import algebra.group_power
import tactic.ring
import linear_algebra.multivariate_polynomial
import ring_theory.localization
universes u v w u₁
-- ### FOR_MATHLIB
-- everything in this section should move to other files
@jcommelin
jcommelin / delta_ring.lean
Last active July 20, 2018 13:20
delta rings
import data.nat.prime
import algebra.group_power
import tactic.ring
universes u v
namespace nat
class Prime :=
(p : ℕ) (pp : nat.prime p)
@jcommelin
jcommelin / five_lemma.lean
Last active April 24, 2018 14:33
Proof of the five lemma in Lean
import tactic
import tactic.find
import init.function
import algebra.group
import group_theory.subgroup
open function
section five_lemma
@jcommelin
jcommelin / five_lemma_statement.lean
Last active April 24, 2018 12:30
Proposed statement of the five lemma
import tactic
import tactic.find
import init.function
import algebra.group
import group_theory.subgroup
open function
section five_lemma
@jcommelin
jcommelin / howto_lean_with_elan.md
Last active June 17, 2024 15:18
Getting started with Lean, mathlib, and elan