chore(library/hott) make funext more general
This commit is contained in:
parent
12429c93c8
commit
228205634d
2 changed files with 8 additions and 10 deletions
|
@ -7,21 +7,19 @@
|
|||
import hott.path hott.equiv
|
||||
open path
|
||||
|
||||
set_option pp.universes true
|
||||
|
||||
-- Funext
|
||||
-- ------
|
||||
|
||||
-- Define function extensionality as a type class
|
||||
inductive funext.{l} [class] : Type.{l+3} :=
|
||||
mk : (Π (A : Type.{l+1}) (P : A → Type.{l+2}) (f g : Π x, P x), IsEquiv (@apD10 A P f g))
|
||||
→ funext.{l}
|
||||
inductive funext [class] : Type :=
|
||||
mk : (Π (A : Type) (P : A → Type ) (f g : Π x, P x), IsEquiv (@apD10 A P f g))
|
||||
→ funext
|
||||
|
||||
namespace funext
|
||||
|
||||
context
|
||||
universe l
|
||||
parameters [F : funext.{l}] {A : Type.{l+1}} {P : A → Type.{l+2}} (f g : Π x, P x)
|
||||
universe variables l k
|
||||
parameters [F : funext.{l k}] {A : Type.{l}} {P : A → Type.{k}} (f g : Π x, P x)
|
||||
|
||||
protected definition ap [instance] : IsEquiv (@apD10 A P f g) :=
|
||||
rec_on F (λ (H : Π A P f g, _), !H)
|
||||
|
|
|
@ -16,8 +16,8 @@ open path truncation sigma function
|
|||
|
||||
-- Naive funext is the simple assertion that pointwise equal functions are equal.
|
||||
-- TODO think about universe levels
|
||||
definition naive_funext.{l} :=
|
||||
Π {A : Type.{l+1}} {P : A → Type.{l+2}} (f g : Πx, P x), (f ∼ g) → f ≈ g
|
||||
definition naive_funext.{l k} :=
|
||||
Π {A : Type.{l}} {P : A → Type.{k}} (f g : Πx, P x), (f ∼ g) → f ≈ g
|
||||
|
||||
-- Weak funext says that a product of contractible types is contractible.
|
||||
definition weak_funext.{l} :=
|
||||
|
@ -92,7 +92,7 @@ end
|
|||
-- Now the proof is fairly easy; we can just use the same induction principle on both sides.
|
||||
universe variable l
|
||||
|
||||
theorem weak_funext_implies_funext (wf : weak_funext.{l}) : funext.{l} :=
|
||||
theorem weak_funext_implies_funext (wf : weak_funext.{l}) : funext.{l+1 l+2} :=
|
||||
funext.mk (λ A B f g,
|
||||
let eq_to_f := (λ g' x, f ≈ g') in
|
||||
let sim2path := htpy_ind _ f eq_to_f idp in
|
||||
|
|
Loading…
Reference in a new issue