You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
clone: proof clause on a renamed axiom is checked but the axiom remains #1236
When a clone has both a proof <ax> by <tac> clause and a rename that applies to <ax>, the proof is checked but not attached to the renamed lemma: the axiom silently remains an axiom in the clone.
require import AllCore.
abstract theory T.
op n : int.
axiom ge0_n : 0 <= n.
end T.
(* Without rename: the axiom is realized. *)
clone T as A with op n = 1 proof ge0_n by done.
(* With rename: the proof is accepted but the axiom stays an axiom. *)
clone T as B with op n = 1 proof ge0_n by done rename "n" as "m".
print axiom.
The file compiles without error, but print axiom still lists
axiom ge0_m: 0 <= m.
(ge0_n from A is correctly gone).
Using the new name in the proof clause is rejected:
clone T as B with op n = 1 proof ge0_m by done rename "n" as "m".
[critical] unknown lemma/axiom `ge0_m'
Workaround: proof * followed by a separate realize under the new name works as expected:
clone T as C with op n = 1 proof * rename "n" as "m".
realize ge0_m by done.
Expected: either the proof given under the old name is attached to the renamed lemma, or the proof clause accepts the new name; in any case the axiom should not silently survive.
Found in examples/ChaChaPoly/chacha_poly.ec (clone TPoly of GenBlock, where ge0_poly_size stays an axiom). Observed on main (ce19cb6).
Activity
examples(ChaChaPoly): prove the Poly1305 bound and instantiate with R…
examples(ChaChaPoly): prove the Poly1305 bound and instantiate with R…
examples(ChaChaPoly): prove the Poly1305 bound and instantiate with R…
examples(ChaChaPoly): prove the Poly1305 bound and instantiate with R…