].
qed.
-axiom eq_nat_of_byte_n_nat_of_byte_mod_n_256:
+lemma eq_nat_of_byte_n_nat_of_byte_mod_n_256:
∀n. byte_of_nat n = byte_of_nat (n \mod 256).
+ intro;
+ unfold byte_of_nat;
+ apply eq_f2;
+ [ rewrite > exadecimal_of_nat_mod in ⊢ (? ? % ?);
+ rewrite > exadecimal_of_nat_mod in ⊢ (? ? ? %);
+ apply eq_f;
+ elim daemon
+ | rewrite > exadecimal_of_nat_mod;
+ rewrite > exadecimal_of_nat_mod in ⊢ (? ? ? %);
+ rewrite > divides_to_eq_mod_mod_mod;
+ [ reflexivity
+ | autobatch
+ ]
+ ]
+qed.
lemma plusbyte_ok:
∀b1,b2,c.
reflexivity.
qed.
-axiom eq_nat_of_byte_mod: ∀b. nat_of_byte b = nat_of_byte b \mod 256.
+lemma eq_nat_of_byte_mod: ∀b. nat_of_byte b = nat_of_byte b \mod 256.
+ intro;
+ lapply (lt_nat_of_byte_256 b);
+ rewrite > (lt_to_eq_mod ? ? Hletin) in ⊢ (? ? ? %);
+ reflexivity.
+qed.
theorem plusbytenc_ok:
∀b1,b2:byte. nat_of_byte (plusbytenc b1 b2) = (b1 + b2) \mod 256.
axiom eq_mod_times_n_m_m_O: ∀n,m. O < m → n * m \mod m = O.
axiom eq_mod_to_eq_plus_mod: ∀a,b,c,m. a \mod m = b \mod m → (a+c) \mod m = (b+c) \mod m.
axiom eq_mod_times_times_mod: ∀a,b,n,m. m = a*n → (a*b) \mod m = a * (b \mod n).
+axiom divides_to_eq_mod_mod_mod: ∀a,n,m. n∣m → a \mod m \mod n = a \mod n.
axiom le_to_le_plus_to_le : ∀a,b,c,d.b\leq d\rarr a+b\leq c+d\rarr a\leq c.
axiom or_lt_le : ∀n,m. n < m ∨ m ≤ n.