On 01/06/16 21:27, Florian Haftmann wrote: > Note that the mixed signs of PolyML.IntInf.lcm maintain the property > > gcd a b * lcm a b = a * b > > whereas the lcm in GCD.thy obeys > > gcd a b * lcm a b = normalize a * normalize b > > which emphasises the dual nature of the gcd/lcm lattice. > > Both are ok in my view; ironically, lcm is used more often in > Isabelle/ML than gcd. Providing an lcm in the manner of HOL is trivial, > though: > > Integer.gcd = PolyML.gcd > Integer.lcm = abs oo PolyML.lcm
These two lines are the plan. Is that a good one or a bad one? Presently, I have used PolyML.IntInf.gcd and PolyML.IntInf.lcm for rat.ML (see da38571dd5bd). It somehow violates our cozy Isabelle/ML library environment to refer to structure PolyML. BTW, AFP has special code generator setup for PolyML.IntInf.gcd here: https://bitbucket.org/isa-afp/afp-devel/src/54c65361e6ed029f70572de89cfc5736153a0feb/thys/Gauss_Jordan/Code_Generation_IArrays_SML.thy?at=default&fileviewer=file-view-default#Code_Generation_IArrays_SML.thy-33 https://bitbucket.org/isa-afp/afp-devel/src/54c65361e6ed029f70572de89cfc5736153a0feb/thys/Echelon_Form/Examples_Echelon_Form_IArrays.thy?at=default&fileviewer=file-view-default#Examples_Echelon_Form_IArrays.thy-44 Luckily, this is only gcd and not lcm, so it coincides already. Makarius
signature.asc
Description: OpenPGP digital signature
_______________________________________________ isabelle-dev mailing list isabelle-...@in.tum.de https://mailmanbroy.informatik.tu-muenchen.de/mailman/listinfo/isabelle-dev