lean4-htt/tests/lean/run/meta_tac4.lean
Sebastian Ullrich fd2c42a8bf chore(library, tests): switch to new attribute declaration syntax
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
2016-08-12 15:36:12 -07:00

21 lines
674 B
Text

open tactic name list
definition foo (a : nat) := a + 1 > 0
attribute [reducible]
definition boo (a : nat) := a + 1 > 0
example : ∀ (a b : nat), foo a → boo a → a + 1 > 0 → foo a :=
by do
intro_lst [`_, `_, `H1, `H2, `H3],
trace_state,
h1 ← get_local_type `H1,
h2 ← get_local_type `H2,
h3 ← get_local_type `H3,
unify h1 h2,
unify h2 h3,
unify h1 h3,
(unify_core reducible h1 h2 <|> trace "H1 =?= H2 failed if only reducible constants can be unfolded"),
unify_core reducible h2 h3,
(unify_core reducible h1 h3 <|> trace "H1 =?= H3 failed if only reducible constants can be unfolded"),
assumption,
return ()