diff --git a/hott/hit/interval.hlean b/hott/hit/interval.hlean index e308d5657..3aea6bb6d 100644 --- a/hott/hit/interval.hlean +++ b/hott/hit/interval.hlean @@ -1,7 +1,6 @@ /- Copyright (c) 2015 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. - Authors: Floris van Doorn Declaration of the interval diff --git a/hott/init/funext.hlean b/hott/init/funext.hlean index 26714de32..a2a7937ac 100644 --- a/hott/init/funext.hlean +++ b/hott/init/funext.hlean @@ -256,3 +256,6 @@ definition naive_funext_of_ua : naive_funext := protected definition homotopy.rec_on [recursor] {Q : (f ∼ g) → Type} (p : f ∼ g) (H : Π(q : f = g), Q (apd10 q)) : Q p := right_inv apd10 p ▸ H (eq_of_homotopy p) + +protected definition homotopy.rec_on_idp [recursor] {Q : Π{g}, (f ∼ g) → Type} {g : Π x, P x} (p : f ∼ g) (H : Q (homotopy.refl f)) : Q p := +homotopy.rec_on p (λq, eq.rec_on q H) diff --git a/hott/init/pathover.hlean b/hott/init/pathover.hlean index c47a60bbc..c8f409b60 100644 --- a/hott/init/pathover.hlean +++ b/hott/init/pathover.hlean @@ -1,7 +1,6 @@ /- Copyright (c) 2015 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. - Author: Floris van Doorn Basic theorems about pathovers diff --git a/hott/init/trunc.hlean b/hott/init/trunc.hlean index 4e1f52418..7b91504ea 100644 --- a/hott/init/trunc.hlean +++ b/hott/init/trunc.hlean @@ -38,13 +38,12 @@ namespace is_trunc definition leq (n m : trunc_index) : Type₀ := trunc_index.rec_on n (λm, unit) (λ n p m, trunc_index.rec_on m (λ p, empty) (λ m q p, p m) p) m + notation x <= y := trunc_index.leq x y + notation x ≤ y := trunc_index.leq x y end trunc_index infix `+2+`:65 := trunc_index.add - notation x <= y := trunc_index.leq x y - notation x ≤ y := trunc_index.leq x y - namespace trunc_index definition succ_le_succ {n m : trunc_index} (H : n ≤ m) : n.+1 ≤ m.+1 := H definition le_of_succ_le_succ {n m : trunc_index} (H : n.+1 ≤ m.+1) : n ≤ m := H diff --git a/hott/types/nat/default.hlean b/hott/types/nat/default.hlean index a4f04a6ca..0bcbecc87 100644 --- a/hott/types/nat/default.hlean +++ b/hott/types/nat/default.hlean @@ -4,4 +4,4 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ -import .basic .order .sub +import .basic .order .sub .hott diff --git a/hott/types/nat/hott.hlean b/hott/types/nat/hott.hlean new file mode 100644 index 000000000..7d7982dd4 --- /dev/null +++ b/hott/types/nat/hott.hlean @@ -0,0 +1,32 @@ +/- +Copyright (c) 2015 Floris van Doorn. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Author: Floris van Doorn + +Theorems about the natural numbers specific to HoTT +-/ + +import .basic + +open is_trunc unit empty eq + +namespace nat + + definition is_hprop_lt [instance] (n m : ℕ) : is_hprop (n < m) := + begin + assert H : Π{n m : ℕ} (p : n < m) (q : succ n = m), p = q ▸ lt.base n, + { intros, cases p, + { assert H' : q = idp, apply is_hset.elim, + cases H', reflexivity}, + { cases q, exfalso, exact lt.irrefl b a}}, + apply is_hprop.mk, intros p q, + induction q, + { apply H}, + { cases p, + exfalso, exact lt.irrefl b a, + exact ap lt.step !v_0} + end + + definition is_hprop_le (n m : ℕ) : is_hprop (n ≤ m) := !is_hprop_lt + +end nat diff --git a/hott/types/nat/order.hlean b/hott/types/nat/order.hlean index 36e80ff03..8e6c1e2a2 100644 --- a/hott/types/nat/order.hlean +++ b/hott/types/nat/order.hlean @@ -9,7 +9,7 @@ Ported from standard library -/ import .basic algebra.ordered_ring -open core prod decidable +open prod decidable sum eq namespace nat diff --git a/hott/types/squareover.hlean b/hott/types/squareover.hlean index 1645d4062..bba14575f 100644 --- a/hott/types/squareover.hlean +++ b/hott/types/squareover.hlean @@ -1,7 +1,6 @@ /- Copyright (c) 2015 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. - Author: Floris van Doorn Theorems about squareovers diff --git a/hott/types/trunc.hlean b/hott/types/trunc.hlean index 5496e047a..26303a491 100644 --- a/hott/types/trunc.hlean +++ b/hott/types/trunc.hlean @@ -10,7 +10,7 @@ Properties of is_trunc and trunctype import types.pi types.eq types.equiv .function -open eq sigma sigma.ops pi function equiv is_trunc.trunctype is_equiv prod +open eq sigma sigma.ops pi function equiv is_trunc.trunctype is_equiv prod is_trunc.trunc_index namespace is_trunc variables {A B : Type} {n : trunc_index} diff --git a/src/emacs/lean-syntax.el b/src/emacs/lean-syntax.el index 5983003e3..dab26aad5 100644 --- a/src/emacs/lean-syntax.el +++ b/src/emacs/lean-syntax.el @@ -135,7 +135,7 @@ (,(rx (not (any "\.")) word-start (group (or "\\b.*_tac" "Cond" "or_else" "then" "try" "when" "assumption" "eassumption" "rapply" - "apply" "fapply" "eapply" "rename" "intro" "intros" "all_goals" "fold" + "apply" "fapply" "eapply" "rename" "intro" "intros" "all_goals" "fold" "focus" "focus_at" "generalize" "generalizes" "clear" "clears" "revert" "reverts" "back" "beta" "done" "exact" "rexact" "refine" "repeat" "whnf" "rotate" "rotate_left" "rotate_right" "inversion" "cases" "rewrite" "esimp" "unfold" "change" "check_expr" "contradiction" "exfalso" "split" "existsi" "constructor" "left" "right"