(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 2 1 1 2

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)
9. sum(if ((x=n)(y=n+1))(P(L[x],L[y])) -1
9. sum(i; ((x=n+1)(y=n))(P(L[x],L[y])) 1
9. sum(else 0 fi | x < ||L||; y < ||L||)
9. =
9. if ((n=n)(n+1=n+1))(P(L[n],L[(n+1)])) -1
9. i; ((n=n+1)(n+1=n))(P(L[n],L[(n+1)])) 1
9. else 0 fi+if ((n+1=n)(n=n+1))(P(L[(n+1)],L[n])) -1
9. else 0 fi+i; ((n+1=n+1)(n=n))(P(L[(n+1)],L[n])) 1
9. else 0 fi+else 0 fi
  if P(L[n],L[(n+1)]) -1 else 0 fi+if P(L[(n+1)],L[n]) 1 else 0 fi
  =
  sum(if ((i=n)(j=n+1))(P(L[i],L[j])) -1
  sum(i; ((i=n+1)(j=n))(P(L[i],L[j])) 1
  sum(else 0 fi | i < ||L||; j < ||L||)


By: HypSubstSq -1 0 THEN Thin -1


Generated subgoal:

1   if P(L[n],L[(n+1)]) -1 else 0 fi+if P(L[(n+1)],L[n]) 1 else 0 fi
  =
  if ((n=n)(n+1=n+1))(P(L[n],L[(n+1)])) -1
  i; ((n=n+1)(n+1=n))(P(L[n],L[(n+1)])) 1
  else 0 fi+if ((n+1=n)(n=n+1))(P(L[(n+1)],L[n])) -1
  else 0 fi+i; ((n+1=n+1)(n=n))(P(L[(n+1)],L[n])) 1
  else 0 fi+else 0 fi

1 step

About:
listboolifthenelseintnatural_numberminusadd
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