Skip to content

Instantly share code, notes, and snippets.

View PatrickMassot's full-sized avatar

Patrick Massot PatrickMassot

View GitHub Profile
@PatrickMassot
PatrickMassot / subtypes.lean
Created July 19, 2018 09:55
refine_struct for subtypes
import algebra.ring
import group_theory.submonoid
import tactic.interactive
namespace tactic
open tactic.interactive
meta def derive_field_subtype : tactic unit :=
do b ← target >>= is_prop,
@PatrickMassot
PatrickMassot / simplicial_set.lean
Created May 28, 2018 14:56
Johan's simplicial set cleanup
import order.basic .simplex_category data.finset data.finsupp algebra.group
local notation ` [`n`] ` := fin (n+1)
/-- Simplicial set -/
class simplicial_set :=
(objs : Π n : ℕ, Type*)
(maps {m n : ℕ} {f : [m] → [n]} (hf : monotone f) : objs n → objs m)
(comp {l m n : ℕ} {f : [l] → [m]} {g : [m] → [n]} (hf : monotone f) (hg : monotone g) :
(maps hf) ∘ (maps hg) = (maps (monotone_comp hf hg)))