Created
October 8, 2015 13:59
-
-
Save gallais/3c6c00eb1b5a85439102 to your computer and use it in GitHub Desktop.
Elaborating With
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
module With where | |
open import Data.Nat using (ℕ ; _+_) | |
open import Relation.Binary.PropositionalEquality | |
module UsingWith where | |
plus-n-0 : (n : ℕ) → n + 0 ≡ n | |
plus-n-0 ℕ.zero = refl | |
plus-n-0 (ℕ.suc n) with n + 0 | plus-n-0 n | |
plus-n-0 (ℕ.suc n) | .n | refl = refl | |
module ElabWith where | |
mutual | |
plus-n-0 : (n : ℕ) → n + 0 ≡ n | |
plus-n-0 ℕ.zero = refl | |
plus-n-0 (ℕ.suc n) = plus-n-0-with n (n + 0) (plus-n-0 n) | |
plus-n-0-with : (n k : ℕ) → k ≡ n → ℕ.suc k ≡ ℕ.suc n | |
plus-n-0-with _ _ refl = refl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment