Created
April 7, 2020 11:09
-
-
Save pnlph/bb867bde410aec1441db43de61b0d528 to your computer and use it in GitHub Desktop.
This file contains 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
ℕ-induction : (A : ℕ → 𝓤 ̇ ) → A 0 → ((n : ℕ) → A n → A (succ n)) → (n : ℕ) → A n | |
ℕ-induction A a₀ f = h where h : (n : ℕ) → A n | |
h 0 = a₀ | |
h (succ n) = f n (h n) | |
ℕ-recursion : (X : 𝓤 ̇ ) → X → (ℕ → X → X) → ℕ → X | |
ℕ-recursion X = ℕ-induction (λ _ → X) | |
ℕ-iteration : (X : 𝓤 ̇ ) → X → (X → X) → ℕ → X | |
ℕ-iteration X x f = ℕ-recursion X x (λ _ x → f x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment