{-# OPTIONS --without-K #-}
open import Agda.Primitive
open import Base
open import Equality
open import EquationalReasoning
open import Composition
open import Homotopies
open import equality.Sigma
open import logic.Contractible
open import logic.Propositions
open import logic.Sets
open import logic.HLevels
open import equivalence.Equivalence
module equivalence.EquivalenceProp {ℓᵢ ℓⱼ} {A : Type ℓᵢ} {B : Type ℓⱼ} where
isContrMapIsProp : (f : A → B) → isProp (isContrMap f)
isContrMapIsProp f = piProp λ a → isContrIsProp
isEquivIsProp : (f : A → B) → isProp (isEquiv f)
isEquivIsProp = isContrMapIsProp
sameEqv : {α β : A ≃ B} → fst α == fst β → α == β
sameEqv {(f , σ)} {(g , τ)} p = Σ-bycomponents (p , (isEquivIsProp g _ τ))
isProp-≃ : (A ≃ B) → isProp A → isProp B
isProp-≃ eq prop x y =
begin
x ==⟨ inv (lrmap-inverse eq) ⟩
lemap eq ((remap eq) x) ==⟨ ap (λ u → lemap eq u) (prop _ _) ⟩
lemap eq ((remap eq) y) ==⟨ lrmap-inverse eq ⟩
y
∎