Library zoo_std.random
From zoo Require Import
prelude.
From zoo.language Require Import
notations.
From zoo.diaframe Require Import
diaframe.
From zoo_std Require Export
base
random__code.
From zoo Require Import
options.
Axiom random٠init𑁒spec : ∀ `{zoo_G : !ZooG Σ} Φ,
Φ ()%V ⊢
WP random٠init () {{ Φ }}.
Axiom random٠bits𑁒spec : ∀ `{zoo_G : !ZooG Σ} Φ,
( ∀ n : Z,
Φ #n
) ⊢
WP random٠bits () {{ Φ }}.
Axiom random٠int𑁒spec : ∀ `{zoo_G : !ZooG Σ} ub Φ,
(0 < ub)%Z →
( ∀ n,
⌜0 ≤ n < ub⌝%Z -∗
Φ #n
) ⊢
WP random٠int #ub {{ Φ }}.
Section zoo_G.
Context `{zoo_G : !ZooG Σ}.
Lemma random٠int𑁒spec_nat (ub : nat) Φ :
0 < ub →
( ∀ n,
⌜n < ub⌝ -∗
Φ #n
) ⊢
WP random٠int #ub {{ Φ }}.
Lemma random٠int_in_range𑁒spec lb ub Φ :
(lb < ub)%Z →
( ∀ n,
⌜lb ≤ n < ub⌝%Z -∗
Φ #n
) ⊢
WP random٠int_in_range #lb #ub {{ Φ }}.
Lemma random٠int_in_range𑁒spec_nat lb ub Φ :
lb < ub →
( ∀ n,
⌜lb ≤ n < ub⌝ -∗
Φ #n
) ⊢
WP random٠int_in_range #lb #ub {{ Φ }}.
End zoo_G.
From zoo_std Require
random__opaque.
prelude.
From zoo.language Require Import
notations.
From zoo.diaframe Require Import
diaframe.
From zoo_std Require Export
base
random__code.
From zoo Require Import
options.
Axiom random٠init𑁒spec : ∀ `{zoo_G : !ZooG Σ} Φ,
Φ ()%V ⊢
WP random٠init () {{ Φ }}.
Axiom random٠bits𑁒spec : ∀ `{zoo_G : !ZooG Σ} Φ,
( ∀ n : Z,
Φ #n
) ⊢
WP random٠bits () {{ Φ }}.
Axiom random٠int𑁒spec : ∀ `{zoo_G : !ZooG Σ} ub Φ,
(0 < ub)%Z →
( ∀ n,
⌜0 ≤ n < ub⌝%Z -∗
Φ #n
) ⊢
WP random٠int #ub {{ Φ }}.
Section zoo_G.
Context `{zoo_G : !ZooG Σ}.
Lemma random٠int𑁒spec_nat (ub : nat) Φ :
0 < ub →
( ∀ n,
⌜n < ub⌝ -∗
Φ #n
) ⊢
WP random٠int #ub {{ Φ }}.
Lemma random٠int_in_range𑁒spec lb ub Φ :
(lb < ub)%Z →
( ∀ n,
⌜lb ≤ n < ub⌝%Z -∗
Φ #n
) ⊢
WP random٠int_in_range #lb #ub {{ Φ }}.
Lemma random٠int_in_range𑁒spec_nat lb ub Φ :
lb < ub →
( ∀ n,
⌜lb ≤ n < ub⌝ -∗
Φ #n
) ⊢
WP random٠int_in_range #lb #ub {{ Φ }}.
End zoo_G.
From zoo_std Require
random__opaque.