604 |
604 |
605 (*reorientation simplification procedure: reorients (polymorphic) |
605 (*reorientation simplification procedure: reorients (polymorphic) |
606 0 = x, 1 = x, nnn = x provided x isn't 0, 1 or a numeral.*) |
606 0 = x, 1 = x, nnn = x provided x isn't 0, 1 or a numeral.*) |
607 fun reorient_proc sg _ (_ $ t $ u) = |
607 fun reorient_proc sg _ (_ $ t $ u) = |
608 case u of |
608 case u of |
609 Const("0", _) => None |
609 Const("0", _) => NONE |
610 | Const("1", _) => None |
610 | Const("1", _) => NONE |
611 | Const("Numeral.number_of", _) $ _ => None |
611 | Const("Numeral.number_of", _) $ _ => NONE |
612 | _ => Some (case t of |
612 | _ => SOME (case t of |
613 Const("0", _) => meta_zero_approx_reorient |
613 Const("0", _) => meta_zero_approx_reorient |
614 | Const("1", _) => meta_one_approx_reorient |
614 | Const("1", _) => meta_one_approx_reorient |
615 | Const("Numeral.number_of", _) $ _ => |
615 | Const("Numeral.number_of", _) $ _ => |
616 meta_number_of_approx_reorient); |
616 meta_number_of_approx_reorient); |
617 |
617 |