2015-10-18 19:07:25 +00:00
|
|
|
structure C [class] :=
|
|
|
|
(val : nat)
|
|
|
|
|
|
|
|
attribute C [multiple_instances]
|
|
|
|
|
|
|
|
definition c1 [instance] : C := C.mk 1
|
|
|
|
definition c2 [instance] : C := C.mk 2
|
|
|
|
|
2015-12-08 22:58:08 +00:00
|
|
|
set_option trace.class_instances true
|
2015-10-18 19:07:25 +00:00
|
|
|
|
|
|
|
definition f [s : C] : nat := C.val
|
|
|
|
|
|
|
|
definition tst1 : f = 1 :=
|
|
|
|
rfl
|
|
|
|
|
|
|
|
definition tst2 : f = 2 :=
|
|
|
|
rfl
|