lean4-htt/old_tests/tests/lean/run/auto_param_in_structures.lean
2018-04-10 12:56:55 -07:00

29 lines
453 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace test
open tactic
meta def my_tac : tactic unit := abstract (intros >> `[simp])
local attribute [simp] add_assoc mul_assoc
structure monoid (α : Type) :=
(op : ααα)
(assoc : ∀ a b c, op (op a b) c = op a (op b c) . my_tac)
def m1 : monoid nat :=
monoid.mk (+)
def m2 : monoid nat :=
monoid.mk (*)
#print m1
#print m2
def m3 : monoid nat :=
{op := (+)}
def m4 : monoid nat :=
{op := (*)}
#print m3
#print m4
end test