Discussion of Homotopy Type Theory and Univalent Foundations
 help / color / mirror / Atom feed
From: Yuhao Huang <temp.use88@gmail.com>
To: Homotopy Type Theory <HomotopyTypeTheory@googlegroups.com>
Subject: [HoTT] Defining n-sphere via HIT in cubical Agda
Date: Sun, 27 Jan 2019 12:11:14 -0800 (PST)	[thread overview]
Message-ID: <834b3418-8ca1-45a9-afb0-4085e6ee6c9c@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1257 bytes --]

I was experimenting cubical Agda with {-# OPTIONS --cubical --rewriting #-}

I tried to define S^2, S^3 separately and found HIT worked fine.

However when I was trying to write down Sphere n for general natural number 
n it simply won't allow me to do so. 
And the error message is "The target of a constructor must be the datatype 
applied to its parameters".
So how do I define a dependent HIT?

PtType : Set₁
PtType = Σ Set (λ A → A)

Ω1 : PtType → PtType
Ω1 A = ((A .snd) ≡ (A .snd)) , refl

Ω : (n : ℕ) → PtType → PtType
Ω 0 A = A
Ω (suc n) A = Ω1 (Ω n A)

data S² : Set where
  base : S²
  surf : ((Ω 2 (S² , base)) .fst)

data S³ : Set where
  base : S³
  cell : ((Ω 3 (S³ , base)) .fst)

data Sphere : ℕ → Set where
  base : (n : ℕ) → Sphere n
  --cell : (n : ℕ) → ((Ω n ((Sphere n) , (base n))) .fst)  -- Error!



















222222222222


-- 
You received this message because you are subscribed to the Google Groups "Homotopy Type Theory" group.
To unsubscribe from this group and stop receiving emails from it, send an email to HomotopyTypeTheory+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 14981 bytes --]

                 reply	other threads:[~2019-01-27 20:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834b3418-8ca1-45a9-afb0-4085e6ee6c9c@googlegroups.com \
    --to=temp.use88@gmail.com \
    --cc=HomotopyTypeTheory@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).