Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6919005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:56:01+00:00 2026-05-27T09:56:01+00:00

In System F I can define the genuine total addition function using Church numerals.

  • 0

In System F I can define the genuine total addition function using Church numerals.

In Haskell I cannot define that function because of the bottom value. For example, in haskell if x + y = x, then I cannot say that y is zero – if x is bottom, x + y = x for any y. So the addition is not the true addition but an approximation to it.

In C I cannot define that function because C specification requires everything to have finite size. So in C possible approximations are even worse than in Haskell.

So we have:

In System F it’s possible to define the addition but it’s not possible to have a complete implementation (because there are no infinite hardware).

In Haskell it’s not possible to define the addition (because of the bottom), and it’s not possible to have a complete implementation.

In C it’s not possible to define the total addition function (because semantic of everything is bounded) but compliant implementations are possible.

So all 3 formal systems (Haskell, System F and C) seem to have different design tradeoffs.

So what are consequences of choosing one over another?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:56:02+00:00Added an answer on May 27, 2026 at 9:56 am

    Haskell

    This is a strange problem because you’re working with a vague notion of =. _|_ = _|_ only “holds” (and even then you should really use ⊑) at the domain semantic level. If we distinguish between information available at the domain semantic level and equality in the language itself, then it’s perfectly correct to say that True ⊑ x + y == x –> True ⊑ y == 0.

    It’s not addition that’s the problem, and it’s not natural numbers that are the problem either — the issue is simply distinguishing between equality in the language and statements about equality or information in the semantics of the language. Absent the issue of bottoms, we can typically reason about Haskell using naive equational logic. With bottoms, we can still use equational reasoning — we just have to be more sophisticated with our equations.

    A fuller and clearer exposition of the relationship between total languages and the partial languages defined by lifting them is given in the excellent paper “Fast and Loose Reasoning is Morally Correct“.

    C

    You claim that the C requires everything (including addressable space) to have a finite size, and therefore that C semantics “impose a limit” on the size of representable naturals. Not really. The C99 standard says the following: “Any pointer type may be converted to an integer type. Except as previously specified, the
    result is implementation-defined. If the result cannot be represented in the integer type,
    the behavior is undefined. The result need not be in the range of values of any integer
    type.” The rationale document further emphasizes that “C has now been implemented on a wide range of architectures. While some of these
    architectures feature uniform pointers which are the size of some integer type, maximally
    portable code cannot assume any necessary correspondence between different pointer types and the integer types. On some implementations, pointers can even be wider than any integer type.”

    As you can see, there’s explicitly no assumption that pointers must be of a finite size.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm interested in creating a system where the user can define the steps in
Let's assume that our system can perform actions, and that an action requires some
On my system I can't run a simple Java application that start a process.
what kind of 'unique' system identifiers can be easily obtained using C# (to hash
To have a general-purpose documentation system that can extract inline documentation of multiple languages,
I need to build a rule-based system that can be run and developed in
i got a got a little embedded system that can be controlled via a
I'm making a system called NCIV in PHP. In that system you can change
I'm building a part of a system where the user can define views from
I'm working on a system that includes a large number of reports, generated using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.