Skip to main content

🍬 Script_expr_hash.v

Proofs

See code, Gitlab , OCaml

Require Import CoqOfOCaml.CoqOfOCaml.
Require Import CoqOfOCaml.Settings.

Require Import TezosOfOCaml.Proto_alpha.Environment.
Require TezosOfOCaml.Proto_alpha.Script_expr_hash.

Require TezosOfOCaml.Proto_alpha.Environment.Proofs.Blake2B.
Require TezosOfOCaml.Proto_alpha.Proofs.Path_encoding.

Lemma H_is_valid : S.HASH.Valid.t (fun _True) Script_expr_hash.H.
  apply Blake2B.Make_is_valid.
Qed.

[compare] function is valid
Lemma compare_is_valid :
  Compare.Valid.t (fun _True) id Script_expr_hash.compare.
Proof. apply Blake2B.Make_is_valid. Qed.
#[global] Hint Resolve compare_is_valid : Compare_db.

Lemma encoding_is_valid :
  Data_encoding.Valid.t (fun _True) Script_expr_hash.encoding.
  apply H_is_valid.
Qed.
#[global] Hint Resolve encoding_is_valid : Data_encoding_db.

Lemma Path_encoding_Make_hex_include_is_valid
  : Path_encoding.S.Valid.t Script_expr_hash.Path_encoding_Make_hex_include.
  apply Path_encoding.Make_hex_is_valid.
  constructor; apply H_is_valid.
Qed.