(65steps 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: partial sort exists 1 1 2 1 1 1 2

1. T : Type
2. P : L:(T List)(||L||-1)
3. m : (T List)
4. L:T List, i:(||L||-1).
4. P(L,i P(swap(L;i;i+1),i) & m(swap(L;i;i+1))<m(L)
5. L : T List
6. 0<||L||
7. f : (T List)(T List)
8. L:T List. 
8. f(L)
8. =
8. if null(L) L
8. else let i = search(||L||-1;P(L)) in if i=0 L else swap(L;i-1;i) fi fi
9. x : T List
10. i:(||x||-1). P(x,i P(swap(x;i;i+1),i) & m(swap(x;i;i+1))<m(x)
11. x = nil
  f(x) = let i = search(||x||-1;P(x)) in if i=0 x else swap(x;i-1;i) fi
  
  m(f(x))m(x) & (m(f(x)) = m(x f(x) = x)


By: AssertBY (0<||x||) (BackThru Thm* L:T List. L = nil  0<||L||)
THEN
Unfold `let` 0
THEN
Reduce 0
THEN
SplitOnConclITE


Generated subgoals:

1 12. 0<||x||
13. search(||x||-1;P(x)) = 0
  f(x) = x  m(f(x))m(x) & (m(f(x)) = m(x f(x) = x)

1 step
2 12. 0<||x||
13. search(||x||-1;P(x)) = 0
  f(x) = swap(x;search(||x||-1;P(x))-1;search(||x||-1;P(x)))
  
  m(f(x))m(x) & (m(f(x)) = m(x f(x) = x)

6 steps

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

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