Zulip Chat Archive

Stream: general

Topic: infer_instance succeeds, exact infer_instance fails


Eric Wieser (Mar 11 2021 at 01:00):

What's going on here?

import data.mv_polynomial.basic
import algebra.algebra.tower

variables {R : Type*} [comm_semiring R]

-- fails quickly
example (m n : ) : is_scalar_tower R (mv_polynomial (fin m) R) (mv_polynomial (fin n) (mv_polynomial (fin m) R)) :=
  by show_term { exact infer_instance }

-- succeeds, very slowly
example (m n : ) : is_scalar_tower R (mv_polynomial (fin m) R) (mv_polynomial (fin n) (mv_polynomial (fin m) R)) :=
  infer_instance

(the instance it finds is docs#mv_polynomial.is_scalar_tower via docs#is_scalar_tower.right)


Last updated: Dec 20 2023 at 11:08 UTC