Skip to Content.
Sympa Menu

ssreflect - [ssreflect] Stable Sorts and Permutations Help

Subject: Ssreflect Users Discussion List

List archive

[ssreflect] Stable Sorts and Permutations Help


Chronological Thread 
  • From: Jake <>
  • To:
  • Subject: [ssreflect] Stable Sorts and Permutations Help
  • Date: Wed, 6 Feb 2019 00:39:17 -0500
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:FXyHMR9sQvCOFf9uRHKM819IXTAuvvDOBiVQ1KB41+0cTK2v8tzYMVDF4r011RmVBdWds6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+557ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRxDohikJNDA37X/ZhdBrga1BvB6svQZyz5LIbIyXMvd1Y6PTfckdRWpERstfUzZOAoCiYIASCOcBP/xXr4rjqFcUoxqxHwqsBPj0xTBSm3/22LY30+skEQ7c3QwgG8gCv2jTrNXwLaofV/2+wqfPzTXGdfxW2DH95ZDHcx87v/GMXKx/cdDVyUYxDQPFiVWRpZbiPzOP2eQAtXWQ4el4Ve+3lWIrtwV8riKsy8oskIXFmJwZxk7e+Slkwos4Jtu1Q1Nhb9G+CptfrSSaOpN2Qsw8R2Fovz43yrgctp66eCgG0Y0nxx3CZ/CefYiE/xDuWeWLLTd3g3Jlf72/hxKs/kS61uL8Ucy03E5LripDjNbMqmgA2wLP5sWDUPdw/Ues1SyR2wzN9O1IO104mKjYJpI5x74/jJsTsUDNHi/sn0X2ibebdkc+9eir9evreLvnqYWfN49vkQ7xKLkumsmkDOQ3NwgBRWmb+eCm2LL/+k35Ra1GjucqnanBrJDaOcMbq7aiAw9OyIYs9Ri/DzO439sEgXkKN0lFeRKCj4jxIV7COvH4DfGlg1Stijhn3f7GPqeySqnKe2PYirrvebt292ZZ0xB2zNZF5psSC7cbIfu1VFWimsbfC0obOg+5i7LlAdZwkJwXWnmFC7KcGKzXuF6MoOkoJr/fN8cupD/hJq19tLbVhngjlApFJPj77d4scHm9W89eDQCcaHvojM0GFD5T7AU7Re3uzlaFVGwKPirgb+cH/jg+TbmeI8LbXIn02e6O2S66GttdYWUUUgnRQ0etTJ2NXrI3UAzXIsJllWZaB72oSotkzBL38QGjlOohIe3T9SkV85nk0Yot6g==

Hi,

I'm an undergraduate at Princeton working on a project in Coq that requires a theory of stable sorts.

Has anyone seen or done work on stable sorts in the past? The only thing I found was Xavier Leroy's Mergesort proof, but I've found his definition unwieldy in proving things about stable sorts.

I'd like to make use of math-comp, especially the definition of permutations, to formulate an elegant definition of what it means for sorts to be stable, but I'm having trouble using the mathematical components library and ssreflect. Is there anyone who could give me guidance on using the permutations part of the library?

One specific question I have about permutations is: how can I evaluate a permutation in Coq? If I define the permutation (01) in S₃:
Let n := 3.

Program Definition zero : 'I_n := Ordinal (_ : 0 < n).
Program Definition one  : 'I_n := Ordinal (_ : 1 < n).
Program Definition two  : 'I_n := Ordinal (_ : 2 < n).
Definition p := tperm zero one.
I can prove things about the action of p:
Goal p zero == one.
Proof. by case: tpermP. Qed.

Goal p _one_ == zero.
Proof. by case: tpermP. Qed.

Goal p two == two.
Proof. by case: tpermP. Qed.
But I can't evaluate it directly like I would a normal Coq function:
Eval compute in ((tperm zero one) zero).
(*
     = perm (can_inj (tperm_proof (Ordinal is_true_true) (Ordinal is_true_true)))
         (Ordinal is_true_true)
     : ordinal_finType n
 *)
Thanks,
Jake Waksbaum




Archive powered by MHonArc 2.6.18.

Top of Page