Skip to content

Instantly share code, notes, and snippets.

@intoverflow
Last active March 28, 2017 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intoverflow/da8805d1de71c1701d17988e8e3a4f03 to your computer and use it in GitHub Desktop.
Save intoverflow/da8805d1de71c1701d17988e8e3a4f03 to your computer and use it in GitHub Desktop.
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