feat(library/standard): add congr theorem

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-07-03 09:44:36 -07:00
parent 0ff145e59b
commit 528d51bc57

View file

@ -95,6 +95,9 @@ theorem congr1 {A : Type} {B : A → Type} {f g : Π x, B x} (H : f = g) (a : 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 congr {A B : Type} {f g : A → B} {a b : A} (H1 : f = g) (H2 : a = b) : f a = g b
:= subst H1 (subst H2 (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