Last active
March 28, 2017 07:18
-
-
Save intoverflow/da8805d1de71c1701d17988e8e3a4f03 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
definition blocking_add (N₁ N₂ : ℕ) : ℕ := N₁ + N₂ | |
theorem foo {N : ℕ} {a b : fin N} | |
: a^.val + b^.val = b^.val + a^.val | |
:= nat.add_comm _ _ | |
theorem bar {N : ℕ} (a : fin (nat.succ N)) (b : fin (N + 1)) | |
: a^.val + b^.val = b^.val + a^.val | |
:= by rw foo | |
theorem baz {N : ℕ} (a : fin (nat.succ N)) (b : fin (blocking_add N 1)) | |
: a^.val + b^.val = b^.val + a^.val | |
:= begin | |
--rw foo -- does not work | |
--rw @foo (nat.succ N) a b -- does not work | |
--unfold blocking_add, rw foo -- works | |
--apply foo -- works | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment