{-# OPTIONS --cubical --safe #-}

open import CubicalExt.Axiom.Choice
module CubicalExt.Logic.ClassicalChoice (ac :  { ℓ'}  AC  ℓ') where

open import Cubical.Foundations.Prelude
open import CubicalExt.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Functions.Surjection
open import Cubical.Data.Sigma
open import Cubical.HITs.PropositionalTruncation
open import CubicalExt.Axiom.ExcludedMiddle
open import CubicalExt.Logic.Diaconescu using (diaconescu)

private variable
   ℓ' ℓ'' : Level

acDep : ACDep  ℓ' ℓ''
acDep = AC→ACDep ac

acRel : ACRel  ℓ' ℓ''
acRel = AC→ACRel ac

surjectionHasRightInverse : SurjectionHasRightInverse  ℓ'
surjectionHasRightInverse Aset Bset sur = acRel Bset Aset  _ _  Bset _ _) sur

instance
  em : EM 
  em = diaconescu  _ _  it) surjectionHasRightInverse
open import CubicalExt.Logic.Classical  em  public