Peter Lammich
2018-10-30 10:13:43 UTC
Hi, consider the following definition
definition finite_rel :: "_ rel ⇒ bool" where "finite_rel ≡ finite"
I would expect to define a constant that is restricted to relations,
i.e., ('a*'a) set, as suggested by
type_synonym 'a rel = "('a × 'a) set"
However, the expansion of type_synonym seems to take place before
expansion of underscores, such that I actually get
consts
finite_rel :: "('a × 'b) set ⇒ bool"
i.e., a constant that is more general than expected.
Is this just a random feature, or is their some rationale behind?
--
Peter
definition finite_rel :: "_ rel ⇒ bool" where "finite_rel ≡ finite"
I would expect to define a constant that is restricted to relations,
i.e., ('a*'a) set, as suggested by
type_synonym 'a rel = "('a × 'a) set"
However, the expansion of type_synonym seems to take place before
expansion of underscores, such that I actually get
consts
finite_rel :: "('a × 'b) set ⇒ bool"
i.e., a constant that is more general than expected.
Is this just a random feature, or is their some rationale behind?
--
Peter