Mercurial > hg > Papers > 2023 > soto-master
diff Paper/src/agda-hoare-term.agda @ 1:a72446879486
Init paper
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Jan 2023 20:28:50 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paper/src/agda-hoare-term.agda Thu Jan 12 20:28:50 2023 +0900 @@ -0,0 +1,12 @@ +loopP' : {l : Level} {t : Set l} → Envc → (exit : Envc → t) → t +loopP' record { c10 = c10 ; varn = zero ; vari = vari } exit = + exit (record { c10 = c10 ; varn = zero ; vari = vari }) +loopP' record { c10 = c10 ; varn = (suc varn₁) ; vari = vari } exit = + whileLoopP' (record { c10 = c10 ; varn = (suc varn₁) ; vari = vari }) + (λ env → loopP' (record { c10 = c10 ; varn = varn₁ ; vari = vari }) exit ) exit + +whileTestPCall' : (c10 : ℕ ) → Envc +whileTestPCall' c10 = whileTestP' {_} {_} c10 (λ env → loopP' env (λ env → env)) + +-- whileTestP' 10 +-- record { c10 = 10 ; varn = 0 ; vari = 10 }