Mercurial > hg > Papers > 2021 > soto-prosym
diff Paper/src/cbc-hoare-loophelper.agda @ 0:c59202657321
init
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 02 Nov 2021 06:55:58 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/src/cbc-hoare-loophelper.agda Tue Nov 02 06:55:58 2021 +0900 @@ -0,0 +1,5 @@ +loopHelper : (n : ℕ) → (env : Envc ) → (eq : varn env ≡ n) → (seq : whileTestStateP s2 env) + → loopPwP' n env (sym eq) seq (λ env₁ x → (vari env₁ ≡ c10 env₁)) +loopHelper zero env eq refl rewrite eq = refl +loopHelper (suc n) env refl refl = + loopHelper n (record { c10 = suc (n + vari env) ; varn = n ; vari = suc (vari env) }) refl (+-suc n (vari env))