42fbc63bb6
@avigad, @fpvandoorn, @rlewis1988, @dselsam I changed how transitive instances are named. The motivation is to avoid a naming collision problem found by Daniel. Before this commit, we were getting an error on the following file tests/lean/run/collision_bug.lean. Now, transitive instances contain the prefix "_trans_". It makes it clear this is an internal definition and it should not be used by users. This change also demonstrates (again) how the `rewrite` tactic is fragile. The problem is that the matching procedure used by it has very little support for solving matching constraints that involving type class instances. Eventually, we will need to reimplement `rewrite` using the new unification procedure used in blast. In the meantime, the workaround is to use `krewrite` (as usual).
9 lines
549 B
Text
9 lines
549 B
Text
a + of_num b = 10 : Prop
|
|
@eq.{1} nat
|
|
(@add.{1} nat nat._trans_of_decidable_linear_ordered_semiring_2 ((λ (x : nat), x) a)
|
|
(nat.of_num (@bit0.{1} num num_has_add (@one.{1} num num_has_one))))
|
|
(@bit0.{1} nat nat._trans_of_decidable_linear_ordered_semiring_2
|
|
(@bit1.{1} nat nat._trans_of_decidable_linear_ordered_semiring_22 nat._trans_of_decidable_linear_ordered_semiring_2
|
|
(@bit0.{1} nat nat._trans_of_decidable_linear_ordered_semiring_2
|
|
(@one.{1} nat nat._trans_of_decidable_linear_ordered_semiring_22)))) :
|
|
Prop
|