feat(hott/init/path): mark 'idp' and 'idpath' with '[unfold-m]' hint

closes #496
This commit is contained in:
Leonardo de Moura 2015-05-04 14:29:22 -07:00
parent 6571c47353
commit 741fca1e7b
3 changed files with 20 additions and 2 deletions

View file

@ -20,8 +20,8 @@ namespace eq
--notation a = b := eq a b
notation x = y `:>`:50 A:49 := @eq A x y
definition idp [reducible] {a : A} := refl a
definition idpath [reducible] (a : A) := refl a
definition idp [reducible] [unfold-m] {a : A} := refl a
definition idpath [reducible] [unfold-m] (a : A) := refl a
-- unbased path induction
definition rec' [reducible] {P : Π (a b : A), (a = b) -> Type}

10
tests/lean/simp_idp.hlean Normal file
View file

@ -0,0 +1,10 @@
open eq
example (A : Type) (C : A → Type) (a : A) (f g : C a → C a) (c : C a) : f = g → f (eq.rec_on idp c) = g c :=
begin
intros,
esimp,
state, -- simplified goal to f c = g c
congruence,
assumption
end

View file

@ -0,0 +1,8 @@
simp_idp.hlean:7:2: proof state
A : Type,
C : A → Type,
a : A,
f g : C a → C a,
c : C a,
a_1 : f = g
⊢ f c = g c