1=0

From Esolang
Jump to: navigation, search

1=0 is an esoteric programming language based on Forte made to mess up some of the peano axioms that Forte does not.

Commands

In 1=0, the main action is to asign new values tu numbers, but it is possible to use the arithmetic asign operators (+=, -=, *=, /= and %=).

Also, using { and }, it is possible to create codeblocks. When one of this structures is assigned to a number, when the nimber is used, it would run it's code instead. Code block can have a return value, which is asigned using an equal sign with nothing at it's left side, being the returned value the value at it's right side. A code block without a specified return, returns 0.

Finally, for IO functions, ! prints the value at it's right as an ascii character, ? gets a character from user input and returns its ascii code, : does the same as ! but as a unber instead of a character and ; gets a number from user input.

Breaking the Peano Axioms

  • 0 is a natural number.
0 -= 1
  • Natural numbers have succesors.
1 = 0
  • a and b compart succesor if and only if a = b.
5 = 0
8 = 0
This works because if a > c and b > d then a + b > c + d so 4 + 4 > 3 + 2.
  • Nothing is predecesor of 0 because negatives are not natural numbers.
0 = 2
  • A list with 0, the successor of 0, the successor of the successor of 0, etc contains all the natural numbers
3 = 0

Examples

Chr Cat

!?

Num Cat

:;

Calculator

55586=;
55587=;
55588=?
88843={
  55586+=55587
}
88845={
  55586-=55587
}
88842={
  55586*=55587
}
88847={
  55586/=55587
}
88837={
  55586%=55587
}
905050=88800
905050+=55588
:55586

Truth Machine

4567=;
5431={
  :1
  905050=5431
}
675434=5430
675434+=4567
:0