Skip to Content.
Sympa Menu

ssreflect - matrix to seq

Subject: Ssreflect Users Discussion List

List archive

matrix to seq


Chronological Thread 
  • From: Vladimir Komendantsky <>
  • To: ssreflect <>
  • Subject: matrix to seq
  • Date: Tue, 15 Feb 2011 15:24:34 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=u+Sv6fhrIf56tCKJVyUBgPV8Zl01hgR8F8QwOAlDEGbc5XiQ7NFkNzjsuR8lI6ZPeW EpclfJxOJRPXhvPyTEYXiEp3b+W909Mk/cDrwDKInqny4H0FAkpp5VpkAi9hWQu9XhMB WGr34022z0ROPVtCoAe91pdbzX1XR3yDvUtdM=

Hello,

Is there a function in ssreflect to sequentialise the contents of a matrix like, for (aT : finType) and (rT : Type),

Definition seq_mx m (M : 'M_(m, #|aT|)) : seq rT :=
  flatten (map (fun i => map (fun j => M i j) (ord_enum #|aT|))
               (ord_enum m)).

To be honest, I haven't proved about this definition much but it seems now that this "flatten" might stand in the way sometime. Is there a standard sequentialisation method?

Is there a better method to convert just a single-row matrix to a list? The above definition is probably too general because I only intend to use it with single-row matrices, that is, where m is 'I_1.

Best regards,
Vladimir




Archive powered by MHonArc 2.6.18.

Top of Page