rule(1): for_all(I : integer, index_range__first <= I and I <= fld_top_ptr(STATE) and
         (dictionary__is_null_symbol(fld_type_sym(element(fld_s(STATE), [I]))) <->
          fld_type_sym(element(fld_s(STATE), [I])) = dictionary__nullsymbol) ->
          (dictionary__is_null_symbol(fld_type_sym(element(fld_s(STATE), [I]))) or
           dictionary__istypemark(fld_type_sym(element(fld_s(STATE), [I])), dictionary__dict)) and
         ((fld_is_defined(fld_lower_bound(element(fld_s(STATE), [I]))) and
           fld_is_defined(fld_upper_bound(element(fld_s(STATE), [I]))) ->
           fld_value(fld_lower_bound(element(fld_s(STATE), [I]))) <=
           fld_value(fld_upper_bound(element(fld_s(STATE), [I])))) and
           fld_actualupperbound(fld_complete_rec(element(fld_s(STATE), [I]))) -
           fld_lowerbound(fld_complete_rec(element(fld_s(STATE), [I]))) < examinerconstants__completechecksize))
         may_be_deduced_from [stack_is_valid(STATE)].

rule(2): stack_is_valid(STATE) may_be_deduced_from
         [for_all(I : integer, index_range__first <= I and I <= fld_top_ptr(STATE) and
          (dictionary__is_null_symbol(fld_type_sym(element(fld_s(STATE), [I]))) <->
           fld_type_sym(element(fld_s(STATE), [I])) = dictionary__nullsymbol) ->
          (dictionary__is_null_symbol(fld_type_sym(element(fld_s(STATE), [I]))) or
           dictionary__istypemark(fld_type_sym(element(fld_s(STATE), [I])), dictionary__dict)) and
          ((fld_is_defined(fld_lower_bound(element(fld_s(STATE), [I]))) and
            fld_is_defined(fld_upper_bound(element(fld_s(STATE), [I]))) ->
            fld_value(fld_lower_bound(element(fld_s(STATE), [I]))) <=
            fld_value(fld_upper_bound(element(fld_s(STATE), [I])))) and
            fld_actualupperbound(fld_complete_rec(element(fld_s(STATE), [I]))) -
            fld_lowerbound(fld_complete_rec(element(fld_s(STATE), [I]))) < examinerconstants__completechecksize))].

rule(3): stack_is_valid(STATE) may_be_deduced_from
         [stack_is_valid(INITIAL_STATE),
          fld_s(INITIAL_STATE) = fld_s(STATE),
          INITIAL_TOP_PTR = fld_top_ptr(INITIAL_STATE),
          for_all(I : integer, index_range__first <= I and I <= fld_top_ptr(STATE) and
          (dictionary__is_null_symbol(fld_type_sym(element(fld_s(INITIAL_STATE), [I]))) <->
           fld_type_sym(element(fld_s(INITIAL_STATE), [I])) = dictionary__nullsymbol) ->
          (dictionary__is_null_symbol(fld_type_sym(element(fld_s(INITIAL_STATE), [I]))) or
           dictionary__istypemark(fld_type_sym(element(fld_s(INITIAL_STATE), [I])), dictionary__dict)) and
          ((fld_is_defined(fld_lower_bound(element(fld_s(INITIAL_STATE), [I]))) and
            fld_is_defined(fld_upper_bound(element(fld_s(INITIAL_STATE), [I]))) ->
            fld_value(fld_lower_bound(element(fld_s(INITIAL_STATE), [I]))) <=
            fld_value(fld_upper_bound(element(fld_s(INITIAL_STATE), [I])))) and
           fld_actualupperbound(fld_complete_rec(element(fld_s(INITIAL_STATE), [I]))) -
           fld_lowerbound(fld_complete_rec(element(fld_s(INITIAL_STATE), [I]))) < examinerconstants__completechecksize))].

rule(4): for_all(I : integer, index_range__first <= I and I <= top_ptr + 1 and
         (dictionary__is_null_symbol(fld_type_sym(element(update(s, [top_ptr + 1], mk__typ_entry(
          type_sym     := TYPE_SYM,
          lower_bound  := LOWER_BOUND,
          upper_bound  := UPPER_BOUND,
          agg_flags    := AGG_FLAGS,
          counter      := COUNTER,
          complete_rec := COMPLETE_REC)), [i_]))) <->
          fld_type_sym(element(update(s, [top_ptr + 1], mk__typ_entry(
          type_sym     := TYPE_SYM, 
          lower_bound  := LOWER_BOUND,
          upper_bound  := UPPER_BOUND,
          agg_flags    := AGG_FLAGS,
          counter      := COUNTER,
          complete_rec := COMPLETE_REC)), [i_])) = dictionary__nullsymbol) ->
         (dictionary__is_null_symbol(fld_type_sym(element(update(s, [top_ptr + 1], mk__typ_entry(
          type_sym     := TYPE_SYM,
          lower_bound  := LOWER_BOUND,
          upper_bound  := UPPER_BOUND,
          agg_flags    := AGG_FLAGS,
          counter      := COUNTER,
          complete_rec := COMPLETE_REC)), [i_]))) or
          dictionary__istypemark(fld_type_sym(element(update(s, [top_ptr + 1], mk__typ_entry(
          type_sym     := TYPE_SYM,
          lower_bound  := LOWER_BOUND, 
          upper_bound  := UPPER_BOUND,
          agg_flags    := AGG_FLAGS,
          counter      := COUNTER,
          complete_rec := COMPLETE_REC)), [i_])), dictionary__dict)) and
         ((fld_is_defined(fld_lower_bound(element(update(s, [top_ptr + 1], mk__typ_entry(
           type_sym     := TYPE_SYM,
           lower_bound  := LOWER_BOUND,
           upper_bound  := UPPER_BOUND,
           agg_flags    := AGG_FLAGS,
           counter      := COUNTER,
           complete_rec := COMPLETE_REC)), [I]))) and
           fld_is_defined(fld_upper_bound(element(update(s, [top_ptr + 1], mk__typ_entry(
           type_sym     := TYPE_SYM,
           lower_bound  := LOWER_BOUND,
           upper_bound  := UPPER_BOUND,
           agg_flags    := AGG_FLAGS,
           counter      := COUNTER,
           complete_rec := COMPLETE_REC)), [I]))) ->
           fld_value(fld_lower_bound(element(update(s, [top_ptr + 1], mk__typ_entry(
           type_sym     := TYPE_SYM,
           lower_bound  := LOWER_BOUND,
           upper_bound  := UPPER_BOUND,
           agg_flags    := AGG_FLAGS,
           counter      := COUNTER,
           complete_rec := COMPLETE_REC)), [I]))) <=
           fld_value(fld_upper_bound(element(update(s, [top_ptr + 1], mk__typ_entry(
           type_sym     := TYPE_SYM,
           lower_bound  := LOWER_BOUND,
           upper_bound  := UPPER_BOUND,
           agg_flags    := AGG_FLAGS,
           counter      := COUNTER,
           complete_rec := COMPLETE_REC)), [I])))) and
           fld_actualupperbound(fld_complete_rec(element(update(s, [top_ptr + 1], mk__typ_entry(
           type_sym     := TYPE_SYM,
           lower_bound  := LOWER_BOUND,
           upper_bound  := UPPER_BOUND,
           agg_flags    := AGG_FLAGS,
           counter      := COUNTER,
           complete_rec := COMPLETE_REC)), [I]))) -
           fld_lowerbound(fld_complete_rec(element(update(s, [top_ptr + 1], mk__typ_entry(
           type_sym     := TYPE_SYM,
           lower_bound  := LOWER_BOUND,
           upper_bound  := UPPER_BOUND,
           agg_flags    := AGG_FLAGS,
           counter      := COUNTER,
           complete_rec := COMPLETE_REC)), [I]))) < examinerconstants__completechecksize)) may_be_deduced_from
          [for_all(I : integer, index_range__first <= I and I <= top_ptr and
           (dictionary__is_null_symbol(fld_type_sym(element(s, [I]))) <-> 
            fld_type_sym(element(s, [I])) = dictionary__nullsymbol) ->
           (dictionary__is_null_symbol(fld_type_sym(element(s, [I]))) or 
            dictionary__istypemark(fld_type_sym(element(s, [I])), dictionary__dict)) and 
           ((fld_is_defined(fld_lower_bound(element(s, [I]))) and
             fld_is_defined(fld_upper_bound(element(s, [I]))) ->
             fld_value(fld_lower_bound(element(s, [I]))) <= fld_value(fld_upper_bound(element(s, [I])))) and
             fld_actualupperbound(fld_complete_rec(element(s, [I]))) -
             fld_lowerbound(fld_complete_rec(element(s, [I]))) < examinerconstants__completechecksize)),
           dictionary__is_null_symbol(TYPE_SYM) or dictionary__istypemark(TYPE_SYM, dictionary__dict),
           fld_is_defined(LOWER_BOUND) and fld_is_defined(UPPER_BOUND) ->
           fld_value(LOWER_BOUND) <= fld_value(UPPER_BOUND),
           fld_actualupperbound(COMPLETE_REC) - fld_lowerbound(COMPLETE_REC) < examinerconstants__completechecksize,
           top_ptr < top_range__last].
