Skip to content

equiv

def uaBeta {A B : Type} (e : Equiv A B) (x : A) : transport (ua e) x ≡ fst e x

Univalence computation rule: transporting along ua e applies the forward function of e.

def equivToPath {A B : Type} (e : Equiv A B) : A ≡ B

Turns an equivalence into a path between types via univalence.

def notInvol2 (b : Bool) : not (not b) ≡ b

Boolean negation is an involution: not (not b) is path-equal to b.

def notFiberContrTrue : isContr (fiber Bool Bool not true)

The fiber of not over true is contractible, centered at false.

def notFiberContrFalse : isContr (fiber Bool Bool not false)

The fiber of not over false is contractible, centered at true.

def notIsEquiv : isEquiv Bool Bool not

Boolean negation is an equivalence: every fiber is contractible.

def notEquiv : Equiv Bool Bool

The equivalence Bool ≃ Bool given by boolean negation.

def notPathBool : Bool ≡ Bool

The nontrivial path Bool ≡ Bool obtained from notEquiv by univalence.

def uaBetaNot (x : Bool) : transport (ua notEquiv) x ≡ not x

Transporting along ua notEquiv computes to not, definitionally.

def uaIdTransport (A : Type) (x : A) : transport (ua (idEquiv A)) x ≡ x

Transporting along ua of the identity equivalence is the identity.

def notPathRoundtrip (x : Bool) : transport notPathBool (transport notPathBool x) ≡ x

Transporting twice along notPathBool returns the original boolean.

def equivInvFun {A B : Type} (e : Equiv A B) (b : B) : A

The inverse function of an equivalence, taken from the centers of its fibers.

def equivSection {A B : Type} (e : Equiv A B) (b : B) : fst e (equivInvFun e b) ≡ b

The inverse of an equivalence is a right inverse: applying the forward function to it gives back the input.

def pathToFun (A : Type) (B : Type) (p : A ≡ B) (a : A) : B

Turns a path between types into a function by transport.

def pathToFunRefl (A : Type) (a : A) : pathToFun A A refl a ≡ a

pathToFun along refl is the identity.

def equivPreservesContr {A B : Type} (e : Equiv A B) (h : isContr A) : isContr B

Equivalences preserve contractibility: if A is contractible and A ≃ B, then B is contractible.

def idEquivBool : Equiv Bool Bool

The identity equivalence on Bool.

def notEquivForward (b : Bool) : fst notEquiv b ≡ not b

The forward function of notEquiv is not.

def equivRetraction {A B : Type} (e : Equiv A B) (a : A) : equivInvFun e (fst e a) ≡ a

The inverse of an equivalence is a left inverse: inverting the image of a gives back a.

def transportSymTransport {A B : Type} (p : A ≡ B) (a : A) : transport (sym p) (transport p a) ≡ a

Transporting along a path and then back along its inverse returns the original element.

def uaDoubleTransport {A B : Type} (e : Equiv A B) (a : A) : transport (sym (ua e)) (transport (ua e) a) ≡ a

Transporting along ua e and then back along its inverse returns the original element.

def pathToFunBool (p : Bool ≡ Bool) (b : Bool) : Bool

Turns a path Bool ≡ Bool into a function on Bool by transport.

def natIdEquiv : Equiv Nat Nat

The identity equivalence on Nat.

def fiberIdCenter (A : Type) (a : A) : fiber A A (fun (x : A) => x) a

The canonical point (a, refl) in the fiber of the identity function over a.

def idEquivListNat : Equiv (List Nat) (List Nat)

The identity equivalence on List Nat.

def notFiberFalseCenter : fiber Bool Bool not false

The center (true, refl) of the fiber of not over false.

def notFiberTrueCenter : fiber Bool Bool not true

The center (false, refl) of the fiber of not over true.

def fiberSuccOne : fiber Nat Nat succ (succ zero)

The point (0, refl) in the fiber of succ over 1.

def fiberSuccTwo : fiber Nat Nat succ (succ (succ zero))

The point (1, refl) in the fiber of succ over 2.

def boolIdEquiv : Equiv Bool Bool

The identity equivalence on Bool.

def uaIdTransportBool (b : Bool) : transport (ua (idEquiv Bool)) b ≡ b

Transporting a boolean along ua of the identity equivalence computes to itself.

def uaIdTransportListNat (xs : List Nat) : transport (ua (idEquiv (List Nat))) xs ≡ xs

Transporting a list of naturals along ua of the identity equivalence computes to itself.

def equivSymPath {A B : Type} (e : Equiv A B) : B ≡ A

The inverse path B ≡ A induced by an equivalence A ≃ B through univalence.

def fiberSuccThree : fiber Nat Nat succ (succ (succ (succ zero)))

The point (2, refl) in the fiber of succ over 3.

def fiberSuccFour : fiber Nat Nat succ (succ (succ (succ (succ zero))))

The point (3, refl) in the fiber of succ over 4.

def fiberAddZero (n : Nat) : fiber Nat Nat (add zero) n

The point (n, refl) in the fiber of add zero over n.

def fiberNotTrue : fiber Bool Bool not true

The point (false, refl) in the fiber of not over true.

def fiberNotFalse : fiber Bool Bool not false

The point (true, refl) in the fiber of not over false.

def pathToFunNat (p : Nat ≡ Nat) (n : Nat) : Nat

Turns a path Nat ≡ Nat into a function on Nat by transport.

def idEquivOptionNat : Equiv (Option Nat) (Option Nat)

The identity equivalence on Maybe Nat.

def idEquivPairNB : Equiv (Pair Nat Bool) (Pair Nat Bool)

The identity equivalence on Pair Nat Bool.

def fiberIdCenterNat (n : Nat) : fiber Nat Nat (fun (x : Nat) => x) n

The canonical point (n, refl) in the fiber of the identity on Nat over n.

def fiberIdCenterBool (b : Bool) : fiber Bool Bool (fun (x : Bool) => x) b

The canonical point (b, refl) in the fiber of the identity on Bool over b.

def pathSym {A B : Type} (p : A ≡ B) : B ≡ A

Inverts a path between types.

def equivTransPath {A B C : Type} (p : A ≡ B) (q : B ≡ C) : A ≡ C

Composes two paths between types.

def transportConstType {A : Type} (a : A) : transport (fun i => A) a ≡ a

Transporting along a constant type family is the identity.

def uaIdCompute {A : Type} (a : A) : transport (ua (idEquiv A)) a ≡ a

Transporting along ua of the identity equivalence is the identity.

def equivForwardPath {A B : Type} (e1 : Equiv A B) (e2 : Equiv A B) (h : (a : A) -> fst e1 a ≡ fst e2 a) : fst e1 ≡ fst e2

Two equivalences with pointwise equal forward functions have path-equal forward functions, by function extensionality.

def transportConstUa {A B C : Type} (e : Equiv A B) (c : C) : transport (fun i => C) c ≡ c

Transporting along a constant type family is the identity, regardless of the given equivalence.

def idEquivEitherNB : Equiv (Either Nat Bool) (Either Nat Bool)

The identity equivalence on Either Nat Bool.

def fiberRefl_succ (n : Nat) : fiber Nat Nat succ (succ n)

The point (n, refl) in the fiber of succ over succ n.

def equivEq {A : Type} : Equiv A A

The identity equivalence on a type, viewed as an equivalence between equal types.

def fiberAddSucc2 : fiber Nat Nat (add (succ zero)) (succ zero)

The point (0, refl) in the fiber of add 1 over 1.

def fiberAddSucc3 : fiber Nat Nat (add (succ zero)) (succ (succ zero))

The point (1, refl) in the fiber of add 1 over 2.

def fiberAddSucc4 : fiber Nat Nat (add (succ zero)) (succ (succ (succ zero)))

The point (2, refl) in the fiber of add 1 over 3.

def fiberSuccFive : fiber Nat Nat succ (succ (succ (succ (succ (succ zero)))))

The point (4, refl) in the fiber of succ over 5.

def fiberSuccSix : fiber Nat Nat succ (succ (succ (succ (succ (succ (succ zero))))))

The point (5, refl) in the fiber of succ over 6.

def compEquivFun {A B C : Type} (e1 : Equiv A B) (e2 : Equiv B C) (a : A) : C

Composes the forward functions of two equivalences.

def compEquivPath {A B C : Type} (e1 : Equiv A B) (e2 : Equiv B C) : A ≡ C

The path A ≡ C obtained by composing the univalence paths of two equivalences.

def fiberConstCenter (A : Type) (B : Type) (b : B) (a : A) : fiber A B (fun (_ : A) => b) b

Any a gives a point (a, refl) in the fiber of a constant function over its value.

def fiberSucc (n : Nat) : fiber Nat Nat succ (succ n)

The point (n, refl) in the fiber of succ over succ n.

def isEquivId (A : Type) : isEquiv A A (fun (x : A) => x)

The identity function is an equivalence.

def equivToIsoFun {A B : Type} (e : Equiv A B) : A -> B

The forward function of an equivalence, viewed as half of an isomorphism.

def equivToIsoInv {A B : Type} (e : Equiv A B) : B -> A

The inverse function of an equivalence, viewed as half of an isomorphism.

def isoToEquiv_id (A : Type) : Equiv A A

The equivalence induced by the identity isomorphism, namely idEquiv.

def equivPreservesIsProp {A B : Type} (e : Equiv A B) (h : isProp A) : isProp B

Equivalences preserve being a proposition: if A is a proposition and A ≃ B, then B is a proposition.

def equivProdFun {A A2 B B2 : Type} (eA : Equiv A A2) (eB : Equiv B B2) (p : A × B) : A2 × B2

The forward function of the product of two equivalences, acting componentwise.

def equivProdInv {A A2 B B2 : Type} (eA : Equiv A A2) (eB : Equiv B B2) (p : A2 × B2) : A × B

The inverse function of the product of two equivalences, acting componentwise.

def equivFunPost {A B B2 : Type} (e : Equiv B B2) (f : A -> B) : A -> B2

Post-composes a function with the forward function of an equivalence.

def equivFunPostInv {A B B2 : Type} (e : Equiv B B2) (f : A -> B2) : A -> B

Post-composes a function with the inverse of an equivalence.

def equivPreservesContr_id : isContr Unit

Unit is contractible, obtained by transferring isContrUnit along the identity equivalence.

def pathToFunNotPath (b : Bool) : pathToFun Bool Bool (ua notEquiv) b ≡ not b

pathToFun along ua notEquiv computes to not.

def uaIdProd (A : Type) (B : Type) (p : A × B) : transport (ua (idEquiv (A × B))) p ≡ p

Transporting a pair along ua of the identity equivalence on a product leaves it unchanged.

def uaIdFun (A : Type) (B : Type) (f : A -> B) : transport (ua (idEquiv (A -> B))) f ≡ f

Transporting a function along ua of the identity equivalence on a function type leaves it unchanged.

def fiberAdd0_at (n : Nat) : fiber Nat Nat (add zero) n

The point (n, refl) in the fiber of add zero over n.

def fiberIdOption (mx : Option Nat) : fiber (Option Nat) (Option Nat) (fun (x : Option Nat) => x) mx

The canonical point (mx, refl) in the fiber of the identity on Maybe Nat over mx.

def isoLem {A : Type} {B : Type} (f : A -> B) (g : B -> A) (s : (y : B) -> f (g y) ≡ y) (t : (x : A) -> g (f x) ≡ x) (y : B) (x0 : A) (x1 : A) (p0 : f x0 ≡ y) (p1 : f x1 ≡ y) : PathP (fun (i : I) => fiber A B f y) (x0, p0) (x1, p1)

Key lemma for isoToIsEquiv: given an isomorphism, any two points of a fiber of f are connected by a path.

def isoToIsEquiv {A : Type} {B : Type} (f : A -> B) (g : B -> A) (s : (y : B) -> f (g y) ≡ y) (t : (x : A) -> g (f x) ≡ x) : isEquiv A B f

An isomorphism (functions both ways with section and retraction) makes the forward function an equivalence.

def isoToEquiv {A : Type} {B : Type} (f : A -> B) (g : B -> A) (s : (y : B) -> f (g y) ≡ y) (t : (x : A) -> g (f x) ≡ x) : Equiv A B

Builds an equivalence from an isomorphism.

def isoToPath {A : Type} {B : Type} (f : A -> B) (g : B -> A) (s : (y : B) -> f (g y) ≡ y) (t : (x : A) -> g (f x) ≡ x) : A ≡ B

Builds a path between types from an isomorphism, via univalence.