Quantcast
Viewing latest article 2
Browse Latest Browse All 3

Positive h-levels are closed under W

I was asked about my proof showing that positive h-levels are closed under W (assuming extensionality), so I decided to write a short note about it.

W-types are defined inductively as follows (using Agda notation):

data W (A : Set) (B : A → Set) : Set where
  sup : (x : A) → (B x → W A B) → W A B

The result can then be stated as follows:

(A : Set) (B : A → Set) →

((x : A) (C : B x → Set) (f g : (y : B x) → C y) →
   ((y : B x) → f y ≡ g y) → f ≡ g) →

(n : ℕ) → H-level (1 + n) A → H-level (1 + n) (W A B)

Here _≡_ is the identity type, and H-level n A means that A has h-level n. Note that B, which is only used negatively in W, can have any h-level. Note also that h-level 0 is not closed under W: the type W ⊤ (λ _ → ⊤) is empty (where is the unit type).

Sketch of the proof:

  1. It is easy to see that W A B is isomorphic to Σ A (λ x → B x → W A B).
  2. Using this isomorphism and extensionality we can prove that, for any x, y : A, f : B x → W A B, and g : B y → W A B, there is a surjection from
    Σ (x ≡ y) (λ p → (i : B x) → f i ≡ g (subst B p i))
    

    to

    sup x f ≡ sup y g.
    

    (The subst function is sometimes called transport.)

  3. We can wrap up by proving
    (s t : W A B) → H-level n (s ≡ t)
    

    by induction on the structure of s. There is one case to consider, in which s = sup x f and t = sup y g. From the inductive hypothesis we get

    H-level n (f i ≡ g j)
    

    for any i, j. In particular, if we assume p : x ≡ y, then we have

    H-level n (f i ≡ g (subst B p i)).
    

    All h-levels are closed under Image may be NSFW.
    Clik here to view.
    \Pi
    (B x) (assuming extensionality), so we get

    H-level n ((i : B x) → f i ≡ g (subst B p i)).
    

    Every h-level is also closed under Σ, so by the assumption that A has h-level 1 + n we get

    H-level n (Σ (x ≡ y) (λ p → (i : B x) → f i ≡ g (subst B p i))).
    

    Finally H-level n respects surjections, so by step 2 above we get

    H-level n (sup x f ≡ sup y g).
    

See the code listing for the full proof, which is stated in a universe-polymorphic way. (Search for “W-types”, and note that identifiers are hyperlinked to their definition.)


Viewing latest article 2
Browse Latest Browse All 3

Trending Articles