pHL's seq with five bounds (EasyCrypt's seq n : E p₁ p₂ p₃ p₄ I) #
For an upper bound on c₁; c₂, EC's
seq n : E p₁ p₂ p₃ p₄ I
splits at the n-th statement over the intermediate event E: c₁ reaches E with probability
at most p₁ and ¬E with at most p₃; from E (and the invariant I, which c₁ establishes)
c₂ reaches the postcondition with at most p₂, from ¬E with at most p₄; and
p₁ p₂ + p₃ p₄ ≤ r.
phoareStmt_seq_le is the rule; phoare_seq n : E p₁ p₂ p₃ p₄ I applies it, splitting after the
first n statements (EC's count), with E and I written like the judgment's conditions (§x).
The goals, in EC's order: I (a Hoare triple about c₁), c₁'s bounds for E, c₂'s from
E ∧ I, c₁'s for ¬E, c₂'s from ¬E ∧ I, the arithmetic. A bound 1 on an event
(EC's 1%r) is closed on the spot.
seq n : P on a lossless goal #
For phoare[ c₁; c₂ : A ==> 1 ] = 1 (islossless), EC's seq n : P asks that c₁ reaches P
with probability 1 and that c₂ is lossless from P (phoareStmt_seq_eq_one):
phoare_seq_lossless n : (P), goals first, second. With P = True (EC's seq n : true)
the first goal is the losslessness of c₁.
pHL's seq with five bounds, for an upper bound.
An event has probability at most 1 (EC's bound 1%r).
pHL's seq n : P for a lossless goal (phoare[ c₁; c₂ : A ==> 1 ] = 1): c₁ reaches
P with probability 1, and from P the rest is lossless.
Split x₁; …; xₙ after its first m statements (EC's count): HoareSplit.splitSeq with the
last n - m in the second block, under the lets of the local variables.
EC's seq n : E p₁ p₂ p₃ p₄ I for an upper bound (see the module docstring).
Equations
- One or more equations did not get rendered due to their size.
Instances For
EC's pHL seq n : P on a lossless goal phoare[ … ==> 1 ] = 1: split after the first
n statements (EC's count). Goals: the first n statements reach P with probability 1
(first; for P = True, lossless), the rest is lossless from P (second).
Equations
- One or more equations did not get rendered due to their size.