# HG changeset patch # User ryokka # Date 1576232595 -32400 # Node ID 7c739972cd262114aa3d55b50fefa764ce0688fb # Parent 9caff4e4a402e704ecf533bce337588edd8c6a76 add loopProof diff -r 9caff4e4a402 -r 7c739972cd26 whileTestGears.agda --- a/whileTestGears.agda Thu Dec 12 18:26:39 2019 +0900 +++ b/whileTestGears.agda Fri Dec 13 19:23:15 2019 +0900 @@ -123,16 +123,14 @@ {-# TERMINATING #-} -whileLoopStep : {l : Level} {t : Set l} → Env → (Code : (e : Env ) → 0 < varn e → t) (Code : (e : Env) → 0 ≡ varn e → t) → t +whileLoopStep : {l : Level} {t : Set l} → Env → (Code : (e : Env ) → 1 ≤ varn e → t) (Code : (e : Env) → 0 ≡ varn e → t) → t whileLoopStep env next exit with <-cmp 0 (varn env) whileLoopStep env next exit | tri≈ _ eq _ = exit env eq -whileLoopStep env next exit | tri< gt _ _ = - next (record {varn = (varn env) - 1 ; vari = (vari env) + 1}) (lem env gt) +whileLoopStep env next exit | tri< gt _ _ = {!!} where lem : (env : Env) → (1 ≤ varn env) → 1 ≤ (varn env - 1) - lem record { varn = (suc na) ; vari = vari } (s≤s gt) with na ≟ 0 - lem record { varn = (suc na) ; vari = vari } (s≤s gt) | does₁ because proof₁ = {!!} - -- n が 0 の時正しくない + lem env 1 _ _ c = ⊥-elim (m