Discussion of Homotopy Type Theory and Univalent Foundations
 help / color / mirror / Atom feed
From: Michael Shulman <shulman@sandiego.edu>
To: Nicolai Kraus <nicolai.kraus@gmail.com>
Cc: "HomotopyTypeTheory@googlegroups.com"
	<HomotopyTypeTheory@googlegroups.com>
Subject: Re: [HoTT] two's complement integers
Date: Thu, 4 Mar 2021 18:27:02 -0800	[thread overview]
Message-ID: <CAOvivQwtAMVnOG7D_A_s1EMAum4fv_x945MLB+01Y_pMdEKC2w@mail.gmail.com> (raw)
In-Reply-To: <58a0a515-d8fa-4eb2-9555-d3a41fdee728@gmail.com>

On Thu, Mar 4, 2021 at 3:16 PM Nicolai Kraus <nicolai.kraus@gmail.com> wrote:
> I'm not sure what the precise thing is that you're looking for because, without further specification, any standard definition of Z would qualify :-)

Yes, that seems to be what Martin suggested too with ℕ + ℕ.  It seemed
to me as though the distance between ℕ + ℕ and my ℤ is greater than
the distance between his 𝔹 and 𝔹', but maybe not in any important
way.

> The HIT is neat, but wouldn't it in practice behave pretty similar to a standard representation via binary lists? E.g. something like Unit + Bool * List(Bool), where inl(*) is zero, the first Bool is the sign, and you add a 1 in front of the list in order to get a positive integer. What's the advantage of the HIT - maybe one can avoid case distinctions?

Is there a non-HIT binary representation that can be interpreted as
two's-complement (thereby avoiding case distinctions on sign)?  I
haven't been able to figure out a way to do that with mere lists of
booleans.

-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/HomotopyTypeTheory/CAOvivQwtAMVnOG7D_A_s1EMAum4fv_x945MLB%2B01Y_pMdEKC2w%40mail.gmail.com.

  reply	other threads:[~2021-03-05  2:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 20:43 Michael Shulman
2021-03-04 21:11 ` Martin Escardo
2021-03-04 22:05   ` Michael Shulman
2021-03-04 22:42     ` Martin Escardo
2021-03-04 23:16     ` Nicolai Kraus
2021-03-05  2:27       ` Michael Shulman [this message]
2021-03-05  3:02         ` Jason Gross
2021-03-05  4:41           ` Michael Shulman

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=CAOvivQwtAMVnOG7D_A_s1EMAum4fv_x945MLB+01Y_pMdEKC2w@mail.gmail.com \
    --to=shulman@sandiego.edu \
    --cc=HomotopyTypeTheory@googlegroups.com \
    --cc=nicolai.kraus@gmail.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).