feat(hott/init/path): mark 'idp' and 'idpath' with '[unfold-m]' hint
closes #496
This commit is contained in:
parent
6571c47353
commit
741fca1e7b
3 changed files with 20 additions and 2 deletions
|
@ -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
10
tests/lean/simp_idp.hlean
Normal 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
|
8
tests/lean/simp_idp.hlean.expected.out
Normal file
8
tests/lean/simp_idp.hlean.expected.out
Normal 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
|
Loading…
Reference in a new issue