{-# OPTIONS --cubical #-} open import Cubical.Core.Everything open import Cubical.Foundations.Prelude foo : Set ≡ Type₀ foo = refl open import Cubical.Data.Nat hiding (elim) lol : (x y : ℕ) (p q : x ≡ y) → p ≡ q lol zero y p q = {!!} lol (suc x) y p q = {!!} {- open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Transport open import Cubical.Data.Nat hiding (elim) open import Cubical.Relation.Nullary open import Cubical.Relation.Nullary.DecidableEq data _∼_ {A : Set} : A → A → Set where REF : {x : A} → x ∼ x uip : {A : Set} {x y : A} (p q : x ∼ y) → p ∼ q uip REF q = {!!} elim : (A : Set) (B : (x y : A) (p : x ∼ y) → Set) → (f : (x : A) → B x x REF) → (x y : A) (p : x ∼ y) → B x y p elim A B f x .x REF = f x data ℤ : Type₀ where inj : ℕ → ℤ neg : ℕ → ℤ data ℤ' : Type₀ where _⊖_ : ℕ → ℕ → ℤ' cancel : (a b : ℕ) → a ⊖ b ≡ suc a ⊖ suc b succ' : ℤ' → ℤ' succ' (a ⊖ b) = suc a ⊖ b succ' (cancel a b i) = cancel (suc a) b i pred' : ℤ' → ℤ' pred' (a ⊖ b) = a ⊖ suc b pred' (cancel a b i) = cancel a (suc b) i fromℤ : ℤ → ℤ' fromℤ (inj n) = n ⊖ 0 fromℤ (neg n) = 0 ⊖ suc n _ℕ-_ : ℕ → ℕ → ℤ n ℕ- zero = inj n zero ℕ- suc m = neg m (suc n) ℕ- suc m = n ℕ- m toℤ : ℤ' → ℤ toℤ (a ⊖ b) = a ℕ- b toℤ (cancel a b i) = a ℕ- b negate : ℤ' → ℤ' negate (a ⊖ b) = b ⊖ a negate (cancel a b i) = cancel b a i add : ℤ' → ℤ' → ℤ' add (a ⊖ b) (a' ⊖ b') = (a + a') ⊖ (b + b') add (a ⊖ b) (cancel a' b' i) = (cancel (a + a') (b + b') ∙ cong₂ _⊖_ (sym (+-suc a a')) (sym (+-suc b b'))) i add (cancel a b i) (a' ⊖ b') = cancel (a + a') (b + b') i add (cancel a b i) (cancel c d j) = {!!} trans : {A : Set} {x y z : A} → x ≡ y → y ≡ z → x ≡ z trans {x = x} p q i = hcomp {φ = i ∨ ~ i} (λ j → λ { (i = i0) → x ; (i = i1) → q j }) (p i) data Trunc (A : Set) : Set where lift : A → Trunc A trunc : (x y : Trunc A) → x ≡ y iterate : {A : Set} → A → (A → A) → ℕ → A iterate x f zero = x iterate x f (suc n) = f (iterate x f n) data ℤmod (n : ℕ) : Set fromℕ : {n : ℕ} → ℕ → ℤmod n data ℤmod n where zero : ℤmod n succ : ℤmod n → ℤmod n wrap : zero ≡ fromℕ n fromℕ zero = zero fromℕ (suc k) = succ (fromℕ k) general-wrap : {n : ℕ} (k : ℕ) → fromℕ {n} k ≡ fromℕ (k + n) general-wrap zero = wrap general-wrap (suc k) = cong succ (general-wrap k) SUCC : {n : ℕ} → ℤmod n → ℤmod n SUCC zero = succ zero SUCC (succ x) = succ (succ x) SUCC {zero} (wrap i) = succ zero SUCC {suc n} (wrap i) = succ (wrap i) PRED : {n : ℕ} → ℤmod n → ℤmod n PRED {n} zero = fromℕ (predℕ n) PRED {n} (succ x) = x PRED {zero} (wrap i) = zero PRED {suc n} (wrap i) = fromℕ n {- plus : {n : ℕ} → ℕ → ℤmod n → ℤmod n plus zero y = y plus (suc x) y = succ (plus x y) plus' : {n : ℕ} → ℤmod n → ℤmod n → ℤmod n lem : {n : ℕ} → (y : ℤmod n) → y ≡ plus' (fromℕ n) y plus' zero y = y plus' (succ x) y = succ (plus' x y) plus' (wrap i) y = lem y i lem zero = {!!} lem (succ y) = {!!} lem (wrap i) = {!!} -} {- plus' : {n : ℕ} → ℤmod n → ℤmod n → ℤmod n plus' x zero = x plus' x (succ y) = succ (plus' x y) plus' x (wrap i) = {!!} -} {- data ℤMOD (n : ℕ) : Set where lif : ℕ → ℤMOD n wrap : lif 0 ≡ lif n general-WRAP : {n : ℕ} (k : ℕ) → lif {n} k ≡ lif {n} (k + n) general-WRAP zero = wrap general-WRAP (suc k) = {!!} -} ref : {A : Set} {x : A} → x ≡ x ref {x = x} = λ i → x con : {A B : Set} {x y : A} → (f : A → B) → x ≡ y → f x ≡ f y con f p i = f (p i) IsContr : Set → Set IsContr X = Σ[ x ∈ X ] ((y : X) → x ≡ y) IsProp : Set → Set IsProp X = (x y : X) → x ≡ y -}