sed -Ei 's/^(\s*)((private |protected )?(noncomputable )?(abbreviation|definition|meta_definition|theorem|lemma|proposition|corollary)\s+\S+\s*)((\s*\[(\S+(\s+[0-9]+)*|priority.*)\])+)\s*/\1attribute \6\n\1\2/' library/**/*.lean tests/**/*.lean sed -Ei 's/\s+$//' library/**/*.lean # remove trailing whitespace
18 lines
473 B
Text
18 lines
473 B
Text
open tactic nat expr option
|
|
|
|
attribute [defeq]
|
|
definition succ_eq_add (n : nat) : succ n = n + 0 + 1 :=
|
|
rfl
|
|
|
|
example (a b : nat) : a = b → succ (succ a) = succ (b + 1) :=
|
|
by do intro `Heq,
|
|
get_local `a >>= subst,
|
|
trace_state,
|
|
dsimp,
|
|
trace "---- after dsimp ----",
|
|
trace_state,
|
|
t ← target,
|
|
match (is_eq t) with
|
|
| (some (lhs, rhs)) := do pr ← mk_app `eq.refl [lhs], exact pr
|
|
| none := failed
|
|
end
|