(29steps total) PrintForm Definitions Lemmas mb list 2 Sections MarkB generic Doc
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html
At: count pairs swap 1 1 1 1 1

1. T : Type
2. L : T List
3. P : TT
4. n : (||L||-1)
5. (nn+1)  ||L||||L||
6. ||swap(L;n;n+1)|| = ||L||
7. f : ||L||||L||
8. i:||L||. f(i) = (nn+1)(i)
  sum(if (i<j)P(swap(L;n;n+1)[i],swap(L;n;n+1)[j]) 1
  sum(else 0 fi | i < ||L||; j < ||L||)
  =
  sum(if (f(i)<f(j))P(swap(L;n;n+1)[(f(i))],swap(L;n;n+1)[(f(j))]) 1
  sum(else 0 fi | i < ||L||; j < ||L||)


By: Assert Bij(||L||; ||L||; f)


Generated subgoals:

1   Bij(||L||; ||L||; f)
3 steps
2 9. Bij(||L||; ||L||; f)
  sum(if (i<j)P(swap(L;n;n+1)[i],swap(L;n;n+1)[j]) 1
  sum(else 0 fi | i < ||L||; j < ||L||)
  =
  sum(if (f(i)<f(j))P(swap(L;n;n+1)[(f(i))],swap(L;n;n+1)[(f(j))]) 1
  sum(else 0 fi | i < ||L||; j < ||L||)

1 step

About:
listboolifthenelseintnatural_numberadd
subtractapplyfunctionuniverseequalmemberall
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html

(29steps total) PrintForm Definitions Lemmas mb list 2 Sections MarkB generic Doc