Nuprl Lemma : quicksort_wf

[T:Type]. ∀[cmp:comparison(T)].
  ∀L:T List. (quicksort(cmp;L) ∈ {srtd:T List| sorted-by(λx,y. (0 ≤ (cmp y));srtd) ∧ permutation(T;srtd;L)} supposin\000Cg valueall-type(T)


Proof




Definitions occuring in Statement :  quicksort: quicksort(cmp;L) comparison: comparison(T) permutation: permutation(T;L1;L2) sorted-by: sorted-by(R;L) list: List valueall-type: valueall-type(T) uimplies: supposing a uall: [x:A]. B[x] le: A ≤ B all: x:A. B[x] and: P ∧ Q member: t ∈ T set: {x:A| B[x]}  apply: a lambda: λx.A[x] natural_number: $n universe: Type
Definitions unfolded in proof :  all: x:A. B[x] uimplies: supposing a member: t ∈ T uall: [x:A]. B[x] rev_implies:  Q iff: ⇐⇒ Q bfalse: ff ifthenelse: if then else fi  uiff: uiff(P;Q) btrue: tt it: unit: Unit bool: 𝔹 quicksort: quicksort(cmp;L) squash: T less_than: a < b less_than': less_than'(a;b) le: A ≤ B subtype_rel: A ⊆B or: P ∨ Q decidable: Dec(P) lelt: i ≤ j < k int_seg: {i..j-} guard: {T} prop: and: P ∧ Q top: Top not: ¬A exists: x:A. B[x] satisfiable_int_formula: satisfiable_int_formula(fmla) ge: i ≥  false: False implies:  Q nat: comparison: comparison(T) true: True rev_uimplies: rev_uimplies(P;Q) cand: c∧ B has-valueall: has-valueall(a) has-value: (a)↓ listp: List+ callbyvalueall: callbyvalueall subtract: m sq_stable: SqStable(P) cons: [a b] refl: Refl(T;x,y.E[x; y]) assert: b lt_int: i <j sq_type: SQType(T) equiv_rel: EquivRel(T;x,y.E[x; y]) so_apply: x[s] so_lambda: λ2x.t[x] sorted-by: sorted-by(R;L) trans: Trans(T;x,y.E[x; y]) sym: Sym(T;x,y.E[x; y]) nequal: a ≠ b ∈  band: p ∧b q
Lemmas referenced :  comparison_wf valueall-type_wf list_wf length_wf_nat nat_wf int_term_value_add_lemma itermAdd_wf equal_wf assert_of_bnot eqff_to_assert iff_weakening_uiff not_wf bnot_wf iff_transitivity assert_of_null eqtt_to_assert assert_wf equal-wf-T-base uiff_transitivity bool_wf top_wf subtype_rel_list null_wf3 lelt_wf decidable__lt non_neg_length int_formula_prop_eq_lemma intformeq_wf false_wf int_seg_subtype decidable__equal_int int_term_value_subtract_lemma int_formula_prop_not_lemma itermSubtract_wf intformnot_wf subtract_wf decidable__le int_seg_properties int_seg_wf length_wf le_wf less_than_wf ge_wf int_formula_prop_wf int_formula_prop_less_lemma int_term_value_var_lemma int_term_value_constant_lemma int_formula_prop_le_lemma int_formula_prop_and_lemma intformless_wf itermVar_wf itermConstant_wf intformle_wf intformand_wf satisfiable-full-omega-tt nat_properties permutation_wf l_member_wf sorted-by_wf permutation-nil sorted-by-nil sqequal-nil eq_int_wf lt_int_wf filter_wf5 list-valueall-type le-add-cancel zero-add not-lt-2 listp_properties evalall-reduce le-add-cancel2 add-zero add_functionality_wrt_le add-commutes add-associates minus-one-mul-top add-swap minus-one-mul minus-add condition-implies-le sq_stable__le not-ge-2 length_of_cons_lemma product_subtype_list nil_wf length_of_nil_lemma list-cases hd_wf valueall-type-has-valueall length-filter-decreases comparison-equiv int_subtype_base subtype_base_sq hd_member l_exists_iff append_wf sorted-by-append assert_of_eq_int set_wf select_wf filter_type all_wf l_all_wf2 l_all_iff member_filter member-permutation assert_of_lt_int member_append iff_weakening_equal true_wf squash_wf int_term_value_minus_lemma itermMinus_wf minus-is-int-iff permutation_weakening append_functionality_wrt_permutation permutation_functionality_wrt_permutation assert_of_le_int equal-wf-base-T neg_assert_of_eq_int le_int_wf permutation-split2 and_wf subtype_rel_sets permutation-subtype filter-filter istype-universe iff_imp_equal_bool bool_cases bool_subtype_base band_wf btrue_wf bfalse_wf full-omega-unsat istype-int istype-le equal-wf-base assert_of_band istype-assert istype-less_than
Rules used in proof :  universeEquality isect_memberEquality because_Cache equalitySymmetry equalityTransitivity axiomEquality dependent_functionElimination lambdaEquality sqequalRule hypothesisEquality cumulativity thin isectElimination extract_by_obid hypothesis sqequalHypSubstitution lambdaFormation cut introduction isect_memberFormation sqequalReflexivity computationStep sqequalTransitivity sqequalSubstitution addEquality impliesFunctionality baseClosed equalityElimination imageElimination dependent_set_memberEquality hypothesis_subsumption applyLambdaEquality applyEquality unionElimination productElimination independent_functionElimination computeAll independent_pairFormation voidEquality voidElimination intEquality int_eqEquality dependent_pairFormation independent_isectElimination natural_numberEquality intWeakElimination rename setElimination setEquality productEquality callbyvalueReduce minusEquality imageMemberEquality promote_hyp instantiate addLevel levelHypothesis functionEquality impliesLevelFunctionality allLevelFunctionality allFunctionality functionExtensionality closedConclusion baseApply pointwiseFunctionality hyp_replacement lambdaEquality_alt universeIsType inhabitedIsType functionExtensionality_alt lambdaFormation_alt approximateComputation dependent_pairFormation_alt Error :memTop,  equalityIstype sqequalBase productIsType isect_memberEquality_alt setIsType

Latex:
\mforall{}[T:Type].  \mforall{}[cmp:comparison(T)].
    \mforall{}L:T  List
        (quicksort(cmp;L)  \mmember{}  \{srtd:T  List|  sorted-by(\mlambda{}x,y.  (0  \mleq{}  (cmp  x  y));srtd)  \mwedge{}  permutation(T;srtd;L)\}\000C  ) 
    supposing  valueall-type(T)



Date html generated: 2020_05_20-AM-08_09_03
Last ObjectModification: 2020_01_08-PM-01_55_15

Theory : general


Home Index