NatEval Module

This module defines conversions for evaluating arithmetic operations on natual number numerals. Because large proofs may involve heavy numeric computation, special consideration is given to the efficieny of these functions.

Types

Type Description

destructed_bit

Functions and values

Function or value Description

add_id_thm0

Full Usage: add_id_thm0

Returns: thm
Returns: thm

add_sub_lemma

Full Usage: add_sub_lemma

Returns: thm
Returns: thm

add_zero_lemma

Full Usage: add_zero_lemma

Returns: thm
Returns: thm

bit0_add_bit0_lemma

Full Usage: bit0_add_bit0_lemma

Returns: thm
Returns: thm

bit0_add_bit1_lemma

Full Usage: bit0_add_bit1_lemma

Returns: thm
Returns: thm

bit0_adddef_thm

Full Usage: bit0_adddef_thm

Returns: thm
Returns: thm

bit0_eq_bit0_lemma

Full Usage: bit0_eq_bit0_lemma

Returns: thm
Returns: thm

bit0_eq_bit1_lemma

Full Usage: bit0_eq_bit1_lemma

Returns: thm
Returns: thm

bit0_eq_zero_lemma

Full Usage: bit0_eq_zero_lemma

Returns: thm
Returns: thm

bit0_even_lemma

Full Usage: bit0_even_lemma

Returns: thm
Returns: thm

bit0_le_bit0_lemma

Full Usage: bit0_le_bit0_lemma

Returns: thm
Returns: thm

bit0_le_bit1_lemma

Full Usage: bit0_le_bit1_lemma

Returns: thm
Returns: thm

bit0_lt_bit0_lemma

Full Usage: bit0_lt_bit0_lemma

Returns: thm
Returns: thm

bit0_lt_bit1_lemma

Full Usage: bit0_lt_bit1_lemma

Returns: thm
Returns: thm

bit0_mult_lemma

Full Usage: bit0_mult_lemma

Returns: thm
Returns: thm

bit0_multdef_thm

Full Usage: bit0_multdef_thm

Returns: thm
Returns: thm

bit0_not_odd_lemma

Full Usage: bit0_not_odd_lemma

Returns: thm
Returns: thm

bit1_add_bit0_lemma

Full Usage: bit1_add_bit0_lemma

Returns: thm
Returns: thm

bit1_add_bit1_lemma

Full Usage: bit1_add_bit1_lemma

Returns: thm
Returns: thm

bit1_adddef_thm

Full Usage: bit1_adddef_thm

Returns: thm
Returns: thm

bit1_eq_bit0_lemma

Full Usage: bit1_eq_bit0_lemma

Returns: thm
Returns: thm

bit1_eq_bit1_lemma

Full Usage: bit1_eq_bit1_lemma

Returns: thm
Returns: thm

bit1_eq_zero_lemma

Full Usage: bit1_eq_zero_lemma

Returns: thm
Returns: thm

bit1_le_bit0_lemma

Full Usage: bit1_le_bit0_lemma

Returns: thm
Returns: thm

bit1_le_bit1_lemma

Full Usage: bit1_le_bit1_lemma

Returns: thm
Returns: thm

bit1_lt_bit0_lemma

Full Usage: bit1_lt_bit0_lemma

Returns: thm
Returns: thm

bit1_lt_bit1_lemma

Full Usage: bit1_lt_bit1_lemma

Returns: thm
Returns: thm

bit1_mult_bit1_lemma

Full Usage: bit1_mult_bit1_lemma

Returns: thm
Returns: thm

bit1_multadddef_thm

Full Usage: bit1_multadddef_thm

Returns: thm
Returns: thm

bit1_multdef_thm

Full Usage: bit1_multdef_thm

Returns: thm
Returns: thm

bit1_not_even_lemma

Full Usage: bit1_not_even_lemma

Returns: thm
Returns: thm

bit1_odd_lemma

Full Usage: bit1_odd_lemma

Returns: thm
Returns: thm

bit1_squared_lemma

Full Usage: bit1_squared_lemma

Returns: thm
Returns: thm

dest_bit tm

Full Usage: dest_bit tm

Parameters:
Returns: destructed_bit
tm : term
Returns: destructed_bit

dest_bit1 tm

Full Usage: dest_bit1 tm

Parameters:
Returns: destructed_bit
tm : term
Returns: destructed_bit

eq_refl_lemma

Full Usage: eq_refl_lemma

Returns: thm
Returns: thm

eval_add_conv tm

Full Usage: eval_add_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral addition. It takes a term of the form `m + n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this equals its numeral value, under no assumptions. `m + n` ------------ |- m + n = z See also: eval_sub_conv, eval_mult_conv, eval_exp_conv.

tm : term
Returns: thm

eval_add_conv0 tm1 tm2

Full Usage: eval_add_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_even_conv tm

Full Usage: eval_even_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral evenness. It takes a term of the form `EVEN n`, where "n" is a natural number numeral, and returns a theorem stating its boolean value, under no assumptions. `EVEN n` --------------- |- EVEN n <=> z See also: eval_odd_conv.

tm : term
Returns: thm

eval_even_conv0 tm

Full Usage: eval_even_conv0 tm

Parameters:
Returns: thm
tm : term
Returns: thm

eval_exp_conv tm

Full Usage: eval_exp_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral exponentiation. It takes a term of the form `m EXP n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this equals its numeral value, under no assumptions. `m EXP n` -------------- |- m EXP n = z See also: eval_add_conv, eval_sub_conv, eval_mult_conv.

tm : term
Returns: thm

eval_exp_conv0 tm1 tm2

Full Usage: eval_exp_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_ge_conv tm

Full Usage: eval_ge_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral greater-than-or-equal comparison. It takes a term of the form `m >= n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this input equals its boolean value, under no assumptions. `m >= n` --------------- |- m >= n <=> z eval_ge_conv, eval_le_conv, eval_lt_conv, eval_nat_eq_conv.

tm : term
Returns: thm

eval_gt_conv tm

Full Usage: eval_gt_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral greater-than comparison. It takes a term of the form `m > n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this input equals its boolean value, under no assumptions. `m > n` -------------- |- m > n <=> z eval_ge_conv, eval_le_conv, eval_lt_conv, eval_nat_eq_conv.

tm : term
Returns: thm

eval_le_conv tm

Full Usage: eval_le_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral less-than-or-equal comparison. It takes a term of the form `m <= n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this input equals its boolean value, under no assumptions. `m <= n` -------------- |- m <= n <=> z See also: eval_lt_conv, eval_ge_conv, eval_gt_conv, eval_nat_eq_conv.

tm : term
Returns: thm

eval_le_conv0 tm1 tm2

Full Usage: eval_le_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_lt_conv tm

Full Usage: eval_lt_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral less-than-or-equal comparison. It takes a term of the form `m < n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this input equals its boolean value, under no assumptions. `m < n` -------------- |- m < n <=> z See also: eval_le_conv, eval_ge_conv, eval_gt_conv, eval_nat_eq_conv.

tm : term
Returns: thm

eval_lt_conv0 tm1 tm2

Full Usage: eval_lt_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_mult_conv tm

Full Usage: eval_mult_conv tm

Parameters:
Returns: thm

eval_mult_conv : term -> thm This is the evaluation conversion for numeral multiplication. It takes a term of the form `m * m`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this equals its numeral value, under no assumptions. `m * n` ------------ |- m * n = z See also: eval_add_conv, eval_sub_conv, eval_exp_conv.

tm : term
Returns: thm

eval_mult_conv0 tm1 tm2

Full Usage: eval_mult_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_nat_eq_conv tm

Full Usage: eval_nat_eq_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeric equality. It takes a term of the form `m = n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this equals its boolean value, under no assumptions. `m = n` -------------- |- m = n <=> z See also: eval_le_conv, eval_lt_conv, eval_ge_conv, eval_gt_conv.

tm : term
Returns: thm

eval_nat_eq_conv0 tm1 tm2

Full Usage: eval_nat_eq_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_odd_conv tm

Full Usage: eval_odd_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral oddness. It takes a term of the form `ODD n`, where "n" is a natural number numeral, and returns a theorem stating its boolean value, under no assumptions. `ODD n` -------------- |- ODD n <=> z See also: eval_even_conv.

tm : term
Returns: thm

eval_odd_conv0 tm

Full Usage: eval_odd_conv0 tm

Parameters:
Returns: thm
tm : term
Returns: thm

eval_pre_conv tm

Full Usage: eval_pre_conv tm

Parameters:
Returns: thm

eval_pre_conv : term -> thm This is the evaluation conversion for numeral predecessor. It takes a term of the form `PRE n`, where "n" is a natural number numeral, and returns a theorem stating that this equals its numeral value, under no assumptions. `PRE n` ------------ |- PRE n = z See also: eval_suc_conv.

tm : term
Returns: thm

eval_pre_conv0 tm0

Full Usage: eval_pre_conv0 tm0

Parameters:
Returns: thm
tm0 : term
Returns: thm

eval_sub_conv tm

Full Usage: eval_sub_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral subtraction. It takes a term of the form `m - n`, where "m" and "n" are both natural number numerals, and returns a theorem stating that this equals its numeral value, under no assumptions. `m - n` ------------ |- m - n = z See also: eval_add_conv, eval_mult_conv, eval_exp_conv.

tm : term
Returns: thm

eval_sub_conv0 tm1 tm2

Full Usage: eval_sub_conv0 tm1 tm2

Parameters:
Returns: thm
tm1 : term
tm2 : term
Returns: thm

eval_suc_conv tm

Full Usage: eval_suc_conv tm

Parameters:
Returns: thm

This is the evaluation conversion for numeral successor. It takes a term of the form `SUC n`, where "n" is a natural number numeral, and returns a theorem stating that this equals its numeral value, under no assumptions. `SUC n` ------------ |- SUC n = z See also: eval_pre_conv.

tm : term
Returns: thm

eval_suc_conv0 tm0

Full Usage: eval_suc_conv0 tm0

Parameters:
Returns: thm
tm0 : term
Returns: thm

exp_bit0_lemma

Full Usage: exp_bit0_lemma

Returns: thm
Returns: thm

exp_bit1_lemma

Full Usage: exp_bit1_lemma

Returns: thm
Returns: thm

exp_one_lemma

Full Usage: exp_one_lemma

Returns: thm
Returns: thm

exp_zero_lemma

Full Usage: exp_zero_lemma

Returns: thm
Returns: thm

ge_le_lemma

Full Usage: ge_le_lemma

Returns: thm
Returns: thm

gt_lt_lemma

Full Usage: gt_lt_lemma

Returns: thm
Returns: thm

l

Full Usage: l

Returns: term
Returns: term

le_refl_lemma

Full Usage: le_refl_lemma

Returns: thm
Returns: thm

le_zero_lemma

Full Usage: le_zero_lemma

Returns: thm
Returns: thm

load

Full Usage: load

Returns: (string * thm) list

Force module evaluation

Returns: (string * thm) list

lt_irrefl_lemma

Full Usage: lt_irrefl_lemma

Returns: thm
Returns: thm

lt_zero_lemma

Full Usage: lt_zero_lemma

Returns: thm
Returns: thm

m

Full Usage: m

Returns: term
Returns: term

mmnn_add_lemma

Full Usage: mmnn_add_lemma

Returns: thm
Returns: thm

mult_bit0_lemma

Full Usage: mult_bit0_lemma

Returns: thm
Returns: thm

mult_id_thm0

Full Usage: mult_id_thm0

Returns: thm
Returns: thm

mult_one_lemma

Full Usage: mult_one_lemma

Returns: thm
Returns: thm

mult_zero_lemma

Full Usage: mult_zero_lemma

Returns: thm
Returns: thm

mult_zero_thm0

Full Usage: mult_zero_thm0

Returns: thm
Returns: thm

n

Full Usage: n

Returns: term
Returns: term

one_mult_lemma

Full Usage: one_mult_lemma

Returns: thm
Returns: thm

one_tm0

Full Usage: one_tm0

Returns: term
Returns: term

pre_suc_lemma

Full Usage: pre_suc_lemma

Returns: thm
Returns: thm

pre_zero_thm0

Full Usage: pre_zero_thm0

Returns: thm
Returns: thm

sub_cancel_lemma

Full Usage: sub_cancel_lemma

Returns: thm
Returns: thm

sub_floor_thm0

Full Usage: sub_floor_thm0

Returns: thm
Returns: thm

sub_zero_lemma

Full Usage: sub_zero_lemma

Returns: thm
Returns: thm

suc_bit0_lemma

Full Usage: suc_bit0_lemma

Returns: thm
Returns: thm

suc_bit1_lemma

Full Usage: suc_bit1_lemma

Returns: thm
Returns: thm

z

Full Usage: z

Returns: term
Returns: term

zero_add_lemma

Full Usage: zero_add_lemma

Returns: thm
Returns: thm

zero_eq_bit0_lemma

Full Usage: zero_eq_bit0_lemma

Returns: thm
Returns: thm

zero_eq_bit1_lemma

Full Usage: zero_eq_bit1_lemma

Returns: thm
Returns: thm

zero_even_lemma

Full Usage: zero_even_lemma

Returns: thm
Returns: thm

zero_le_lemma

Full Usage: zero_le_lemma

Returns: thm
Returns: thm

zero_lt_lemma

Full Usage: zero_lt_lemma

Returns: thm
Returns: thm

zero_mult_lemma

Full Usage: zero_mult_lemma

Returns: thm
Returns: thm

zero_not_odd_lemma

Full Usage: zero_not_odd_lemma

Returns: thm
Returns: thm