Created
September 7, 2023 15:14
-
-
Save cppio/c0308fc792b91cbbe455b25918767a93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# OPTIONS --cubical-compatible #-} | |
| open import Data.Nat.Base | |
| open import Data.Product | |
| open import Relation.Nullary | |
| open import Relation.Unary | |
| module Markov {p} (P : ℕ → Set p) (dec : Decidable P) .(h : Σ ℕ P) where | |
| {-# TERMINATING #-} | |
| markov′ : ∀ n → (∀ m → m <′ n → ¬ P m) → Σ ℕ P | |
| markov′ n pf with dec n | |
| ... | yes p = n , p | |
| ... | no p = markov′ (suc n) λ where | |
| n ≤′-refl → p | |
| m (≤′-step lt) → pf m lt | |
| markov : Σ ℕ P | |
| markov = markov′ zero λ _ () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment