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
13 lines
307 B
Text
13 lines
307 B
Text
open nat tactic
|
|
variables {A : Type}
|
|
|
|
attribute [defeq]
|
|
definition succ_eq_add (n : nat) : succ n = n + 1 :=
|
|
rfl
|
|
|
|
example (n m : nat) (H : succ (succ n) = succ m) : true :=
|
|
by do H ← get_local `H,
|
|
t ← infer_type H,
|
|
t' ← defeq_simp t,
|
|
trace t',
|
|
exact (expr.const `trivial [])
|