feat(library/standard): add equal_f theorem

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-06-30 12:00:47 -07:00
parent c5828dcf6c
commit 2ea1e68f25

View file

@ -73,12 +73,15 @@ theorem trans {A : Type} {a b c : A} (H1 : a = b) (H2 : b = c) : a = c
theorem symm {A : Type} {a b : A} (H : a = b) : b = a
:= subst H (refl a)
theorem congr1 {A B : Type} {f g : A → B} (H : f = g) (a : A) : f a = g a
theorem congr1 {A : Type} {B : A → Type} {f g : Π x, B x} (H : f = g) (a : A) : f a = g a
:= subst H (refl (f a))
theorem congr2 {A B : Type} {a b : A} (f : A → B) (H : a = b) : f a = f b
:= subst H (refl (f a))
theorem equal_f {A : Type} {B : A → Type} {f g : Π x, B x} (H : f = g) : ∀ x, f x = g x
:= take x, congr1 H x
definition cast {A B : Type} (H : A = B) (a : A) : B
:= eq_rec a H