MENTAL
 Main Menu
 Language
 Derivatives
 Greater and Less


Greater and Less
 GREATER AND LESS

"The whole is greater than the sum of its parts" (Aristotle).



Semantics and syntax

A real number r1 is greater than another real number r2 (and is written r1>r2 if and only if r1−r2 belongs to R/+, the positive real ray or, in other words, if r2−r1 belongs to R/−, the negative real ray.

A real number r1 is less than another real number r2 (and is written r1<r2)if and only if r1−r2 belongs to R/−, the negative real ray or, in other words, if r2−r1 belongs to R/+. the positive real ray.


Definitions

⟨( r1>r2 =: (r1r2R/+) )⟩

⟨( r1<r2 =: (r2r1R/+) )⟩



Justification

It is the formal definition of comparison operators in terms of membership of real semiring.


Examples
  1. (3<4)? // ev. α

  2. (4<3)? // ev. θ

  3. (3>4)? // ev. θ

  4. (4>3)? // ev. α

  5. (n = 7)
    (v ← (n>5) // ev. v


  6. (n1 = 7)
    (n2 = 4)
    (u ← ((n1>5) ← (n2<3)) →' v) // ev. v

Remarks
Properties
  1. ⟨( r1>r2r2<r1 )⟩

  2. ⟨( r1=r2 ↔ (r1r2)=0 )⟩

  3. ⟨( r1>r2 ↔ (1.÷r1 < 1.÷r2) )⟩

  4. ⟨( (r1>r2r>0) → (r1*r> r2*r) )⟩

  5. ⟨( r1>r2r<0 → (r1*r< r2*r) )⟩

Contrary operators

Syntax

Not greater than (or less than or equal to): >' eq.

Not less than (or greater than or equal to): <' eq.


Definitions

⟨( r1r2 =: ((r1>r2)? ∨ (r1=r2)?) )⟩

⟨( r1r2 =: ((r1<r2)? ∨ (r1=r2/b>}?) )⟩



Examples
  1. (3≤4)? // ev. α
  2. (3≥4)? // ev. θ

Contrary Operator "Not equal" or "Distinct"

Syintax

Not equal or different: =' eq.


Definition

⟨( r1r2 =: (α ←' (r1=r2)→ θ )⟩

Alternate definition:
⟨( r1r2 =: ((r1<r2)? ∨ (r1>r2)?) )⟩


Examples
  1. (3≠4)? // ev. α

  2. (3≠3)? // ev. θ