[Imprint][Data Privacy Statement][E-Mail]

Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Specification bnat
enrich
   nat
with
   sorts BNat;
   constants 
       MAX_Nat : Nat;
   
   functions 
       . toNat : BNat → Nat;
   
   predicates 
       . <b . : BNat × BNat;
       . ≤b . : BNat × BNat;
       . >b . : BNat × BNat;
       . ≥b . : BNat × BNat;
   
   variables 
       bm : BNat;
       bn : BNat;
       m : Nat;
       n : Nat;
   
   partial functions 
       . toBNat : Nat → BNat with λ n. n ≤ MAX_Nat;
       . -b . : BNat × BNat → BNat prio 8 left with λ bn, bm. bn ≥b bm;
       . +b . : BNat × BNat → BNat with λ bn, bm. bn.toNat + bm.toNat ≤ MAX_Nat;
   
   induction 
      BNat generated by  . toBNat;
   
   axioms 
      bounded: bm.toNat ≤ MAX_Nat;
      used for: s, ls;
      
      toNat-toBNat-inv: m ≤ MAX_Nat ⊦ m.toBNat.toNat = m;
      used for: s, ls;
      
      toBNat-toNat-def: bm.toNat.toBNat = bm;
      used for: s, ls;
      
      add-def: bm +b bn = (bm.toNat + bn.toNat).toBNat;
      used for: s, ls;
      
      sub-def: bm -b bn = (bm.toNat - bn.toNat).toBNat;
      used for: s, ls;
      
      ls-def: bm <b bn ↔ bm.toNat < bn.toNat;
      used for: s, ls;
      
      le-def: bm ≤b bn ↔ bn.toNat ≤ bm.toNat;
      used for: s, ls;
      
      gr-def: bm >b bn ↔ bn.toNat > bm.toNat;
      used for: s, ls;
      
      ge-def: bm ≥b bn ↔ bm ≤b bn;
      used for: s, ls;
   
   theorems 
      elim-toNat: m = bm.toNat ↔ bm = m.toBNat ∧ m ≤ MAX_Nat;
      used for: e;
   
   
end enrich