Discussion of Homotopy Type Theory and Univalent Foundations
 help / color / mirror / Atom feed
* How to define w types in agda?
@ 2018-01-25 16:26 du yu
  2018-01-26  2:38 ` [HoTT] " Favonia
  0 siblings, 1 reply; 3+ messages in thread
From: du yu @ 2018-01-25 16:26 UTC (permalink / raw)
  To: Homotopy Type Theory


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

I have the following initial thoughts but can't work out to define zero as 
a w type

data Zro : Set  where

data One : Set where
  O1 : One

data Two : Set where
  O2 : Two
  I2 : Two
-- w types 

rec2 : (x y : Set) -> Two -> Set
rec2 x _ O2 = x
rec2 _ y I2 = y


data W (A : Set) (B : A -> Set) : Set where -- well founded trees
  w : (s : A) -> B s -> W A B
  sup : (a : A) -> ((B a) -> ((x : A) -> W A B )) -> W A B

natw : Set
natw = W Two (rec2 Zro One) -- nat type as w type

zero_w : natw
zero_w = sup O2 (λ x y → {!!})


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-26  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25 16:26 How to define w types in agda? du yu
2018-01-26  2:38 ` [HoTT] " Favonia
2018-01-26  8:50   ` du yu

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).