diff --git a/library/standard/logic.lean b/library/standard/logic.lean index ce52928f4..bbce237d2 100644 --- a/library/standard/logic.lean +++ b/library/standard/logic.lean @@ -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