Contents

  1. Transport of function types
  2. The types of axioms

{-# OPTIONS --without-K --safe #-}

module univalence-consequences where 

open import mltt
open import twocatconstructions
open import basichomotopy
open import univalence-base
open import univalence-funext

open ≡-Reasoning
open ◾-lemmas

Transport of function types

We deduce some consequences from the univalence and function extensionality axioms. Of course, we now know the latter follows from the former. However, it simplifies some of the statements to directly assume function extensionality instead of univalence.

Some of these lemmas are of independent interest, in that they allow, or will allow, to explicitly compute transports involving function types. The general scheme is the following: given have dependent types \(P , Q \colon A → 𝓤\), we consider the transport of a function type \(f \colon P x → Q x\) along a path \(p \colon x ≡ y\) in the base.

The first one, as a matter of fact, does not rely on function extensionality, and can be cleanly proved by path induction.

transport-is-conjugation :  { ℓ'} {A : Set } {P Q : A  Set ℓ'} {x y : A}
                           (p : x  y) (f : P x  Q x)  
                           transport  v  P v  Q v) p f   u  transport Q p (f (transport P (p ⁻¹) u)))
transport-is-conjugation refl f = refl
The main task is to compare the transport of \(f \colon P x → Q x\) along \(p \colon x ≡ y\) to a function \(g \colon P y → Q y\). For this, we assume function extensionality:
module funext-transport { ℓ' : Level}
                        (hfe : hfunext ℓ' ℓ') 
                          where


  transport-and-equality : {A : Set } {P Q : A  Set ℓ'} {x y : A}
                           (p : x  y) (f : P x  Q x) (g : P y  Q y) 
                           (transport  v  P v  Q v) p f  g)  ( Π[ u  P x ] (transport Q p (f u)  g (transport P p u)) )
  transport-and-equality refl f g = (happly f g) , (hfe f g)

  -- using the syntax declaration
  transport-and-equality' : {A : Set } {P Q : A  Set ℓ'} {x y : A}
                            (p : x  y) (f : P x  Q x) (g : P y  Q y) 
                            p  f  g  ( Π[ u  P x ] (transport Q p (f u)  g (transport P p u)) )
  transport-and-equality' refl f g = (happly f g) , (hfe f g)

  module transport-and-equality-path
          {A : Set } {P Q : A  Set ℓ'} {x y : A}
          (p : x  y) (f : P x  Q x) (g : P y  Q y)
          (q : p  f  g)
            where


     : Π[ u  P x ] (transport Q p (f u)  g (transport P p u))
     = π₁ (transport-and-equality p f g) q

    q̂₁ : Π[ u  P x ] (transport  v  P v  Q v) p f (transport P p u)  g (transport P p u))
    q̂₁ u = transport  v  P v  Q v) p f (transport P p u)        ≡⟨ ap (ev' (transport P p u)) (transport-is-conjugation p f)  
           transport Q p (f (transport P (p ⁻¹) (transport P p u))) ≡⟨ ap (transport Q p) lemma  
           transport Q p (f u)                                      ≡⟨  u 
           g (transport P p u)                                      
              where
                open transport-lemmas
                lemma : f (transport P (p ⁻¹) (transport P p u))  f u
                lemma = f (transport P (p ⁻¹) (transport P p u)) ≡⟨ ap f (transport◾ p (p ⁻¹)  {u}) 
                        f (transport P (p  p ⁻¹) u)             ≡⟨ ap f (transport≡ (rinv p))  
                        f u                                      

  identity : {A : Set } {P Q : A  Set ℓ'} {x y : A}
             (p : x  y) (f : P x  Q x) (g : P y  Q y)
             (q : p  f  g)  (u : P x)  
             (happly (transport  v  P v  Q v) p f) g q) (transport P p u)  transport-and-equality-path.q̂₁ p f g q u 
  identity refl f g q u = (ru (ap  f₁  f₁ u) q)) ⁻¹
module univ-transport { : Level} (ua : is-univalent ) (A B : Set ) (u : A  B) where

  open U-Rules ua

  p : A  B
  p = Eq→Id A B u

  e : A  B
  e = π₁ u

  e⁻¹ : B  A
  e⁻¹ = Id→Fun (p ⁻¹)

  private

    e₁ : A  B
    e₁ = Id→Fun p

    γ : e₁  e
    γ = ap π₁ (Eq→Id-is-rinv u)

    -- γ̂ : e₁ ~ e
    -- γ̂ = happly _ _ γ

  function-transport₁ : (f : A  A)  transport  Z  Z  Z) p f  λ b  e (f (e⁻¹ b))
  function-transport₁ f = transport  Z  Z  Z) p f   ≡⟨ transport-is-conjugation {P = λ Z  Z} {Q = λ Z  Z} {A} {B} p f 
                           b  e₁ (f (e⁻¹ b)))        ≡⟨ ap  h   b  h (f (e⁻¹ b)))) γ 
                           b  e (f (e⁻¹ b)))         

  function-transport₂ : (f : A  A  A)  transport  Z  Z  Z  Z) p f  λ b b₁  e (f (e⁻¹ b) (e⁻¹ b₁))
  function-transport₂ f = transport  Z  Z  Z  Z) p f 
                                    ≡⟨ transport-is-conjugation {P = λ Z  Z} {Q = λ Z  Z  Z} {A} {B} p f 
                           b  transport  Z  Z  Z) p (f (e⁻¹ b)))
                                    ≡⟨ dfe _ _ δ 
                           b b₁  e (f (e⁻¹ b) (e⁻¹ b₁))) 
                            where
                              dfe : dfunext  
                              dfe = univalence→dfunext ua

                              δ = λ b  function-transport₁ (f (e⁻¹ b))

top ⇑


The types of axioms

open import sets-logic
open import more-logic
iseq-is-prop :  { ℓ'}  dfunext ℓ' (  ℓ')  dfunext (  ℓ') (  ℓ') 
               {A : Set }{B : Set ℓ'} (f : A  B) 
               isProp (isweq f)
iseq-is-prop dfe dfe⁺ f = Π-prop-is-prop dfe  b  isSingleton-is-Prop dfe⁺ {hfib f b})

top ⇑