\begin{code}
{-# OPTIONS --without-K #-}
module Continuity.EquivalentFormulationsOfUC where
open import Preliminaries.SetsAndFunctions
open import Preliminaries.NaturalNumber hiding (_+_)
open import Preliminaries.Boolean
open import Preliminaries.Sequence
open import Continuity.DecidabilityOfUC
open import Continuity.MainLemmas
open import Continuity.PropositionalTruncation
open import Continuity.TheoremKECA
\end{code}
\begin{code}
UC : Set
UC = (f : ₂ℕ → ℕ) → ∥ (Σ \(n : ℕ) → ∀(α β : ₂ℕ) → α ≡[ n ] β → f α ≡ f β) ∥
CH-UC : Set
CH-UC = (f : ₂ℕ → ℕ) → Σ \(n : ℕ) → ∀(α β : ₂ℕ) → α ≡[ n ] β → f α ≡ f β
\end{code}
\begin{code}
MainLemma : {A : ℕ → Set} →
(dA : ∀ n → A n → ∀ i → i ≤ n → decidable (A i)) →
(∀ n → hprop (A n))
→ ∥ (Σ \(n : ℕ) → A n) ∥ → Σ \(n : ℕ) → A n
MainLemma dA hA = Theorem[KECA-TLCA'2013] (μ dA) (μ-constant dA hA)
\end{code}
\begin{code}
Theorem[CH-UC→UC] : CH-UC → UC
Theorem[CH-UC→UC] chuc = λ f → ∣ chuc f ∣
Theorem[UC→CH-UC] : Funext → UC → CH-UC
Theorem[UC→CH-UC] funext uc =
λ f → MainLemma (Uc-≤-decidable f) (Uc-hprop funext f) (uc f)
\end{code}