Ignore:
Timestamp:
Dec 5, 2010, 11:54:59 PM (9 years ago)
Author:
sacerdot
Message:

1) notation for cast fixed
2) ambiguity reduced: Empty => VEmpty, Cons => VCons
3) DoTest? modified to pretty-print the execution trace.

This should make debugging easier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/Matita/BitVector.ma

    r362 r374  
    205205  let difference ≝ n - size in
    206206   less_than_or_equal_b_elim …
    207     (λH:size ≤ n. ((pad difference size bitvector)⌈BitVector n ↦ BitVector (difference+size)⌉))
     207    (λH:size ≤ n. ((pad difference size bitvector)⌈BitVector (difference+size) ↦ BitVector n⌉))
    208208    (λH:¬(size ≤ n). max n).
    209209 nnormalize; nrewrite > (plus_minus_inverse_right n ?); //; nassumption.
     
    212212nlet rec nat_of_bitvector (n: Nat) (b: BitVector n) on b ≝
    213213  match b with
    214     [ Empty ⇒ Z
    215     | Cons o hd tl ⇒
     214    [ VEmpty ⇒ Z
     215    | VCons o hd tl ⇒
    216216      let hdval ≝ match hd with [ true ⇒ S Z | false ⇒ Z ] in
    217217        ((exponential (S (S Z)) o) * hdval) + nat_of_bitvector o tl
Note: See TracChangeset for help on using the changeset viewer.