lean2/library/hott/axioms/funext.lean

25 lines
825 B
Text
Raw Normal View History

-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Author: Jeremy Avigad, Jakob von Raumer
-- Ported from Coq HoTT
-- TODO: take a look at the Coq tricks
import hott.path hott.equiv
open path
-- Funext
-- ------
2014-11-07 00:41:08 +00:00
axiom funext {A : Type} {P : A → Type} (f g : Πx, P x) : IsEquiv (@apD10 A P f g)
2014-11-07 00:41:08 +00:00
theorem funext_instance [instance] {A : Type} {P : A → Type} (f g : Πx, P x) :
IsEquiv (@apD10 A P f g) :=
@funext A P f g
2014-11-07 00:41:08 +00:00
definition path_forall {A : Type} {P : A → Type} (f g : Πx, P x) : f g → f ≈ g :=
IsEquiv.inv !apD10
2014-11-07 00:41:08 +00:00
definition path_forall2 {A B : Type} {P : A → B → Type} (f g : Πx y, P x y) :
(Πx y, f x y ≈ g x y) → f ≈ g :=
λE, path_forall f g (λx, path_forall (f x) (g x) (E x))