Nuprl Lemma : sorted-by-exists

[T:Type]
  ∀eq,r:T ⟶ T ⟶ 𝔹.
    Linorder(T;a,b.↑(r b))
     (∀L:T List. ∃L':T List. (sorted-by(λx,y. (↑(r y));L') ∧ no_repeats(T;L') ∧ L ⊆ L' ∧ L' ⊆ L)) 
    supposing ∀a,b:T.  (↑(eq b) ⇐⇒ b ∈ T)


Proof




Definitions occuring in Statement :  sorted-by: sorted-by(R;L) l_contains: A ⊆ B no_repeats: no_repeats(T;l) list: List linorder: Linorder(T;x,y.R[x; y]) assert: b bool: 𝔹 uimplies: supposing a uall: [x:A]. B[x] all: x:A. B[x] exists: x:A. B[x] iff: ⇐⇒ Q implies:  Q and: P ∧ Q apply: a lambda: λx.A[x] function: x:A ⟶ B[x] universe: Type equal: t ∈ T
Definitions unfolded in proof :  uall: [x:A]. B[x] all: x:A. B[x] uimplies: supposing a member: t ∈ T iff: ⇐⇒ Q and: P ∧ Q implies:  Q prop: rev_implies:  Q so_lambda: λ2x.t[x] so_apply: x[s] so_lambda: λ2y.t[x; y] so_apply: x[s1;s2] exists: x:A. B[x] cand: c∧ B top: Top sorted-by: sorted-by(R;L) select: L[n] nil: [] it: guard: {T} int_seg: {i..j-} lelt: i ≤ j < k satisfiable_int_formula: satisfiable_int_formula(fmla) false: False not: ¬A l_contains: A ⊆ B or: P ∨ Q l_all: (∀x∈L.P[x]) decidable: Dec(P) less_than: a < b squash: T
Lemmas referenced :  assert_wf assert_witness equal_wf list_induction exists_wf list_wf sorted-by_wf l_member_wf no_repeats_wf l_contains_wf linorder_wf all_wf iff_wf bool_wf nil_wf no_repeats_nil l_contains_nil length_of_nil_lemma stuck-spread base_wf int_seg_properties satisfiable-full-omega-tt intformand_wf intformless_wf itermVar_wf intformle_wf itermConstant_wf int_formula_prop_and_lemma int_formula_prop_less_lemma int_term_value_var_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_formula_prop_wf int_seg_wf insert-by_wf cons_wf insert-by-sorted-by insert-by-no-repeats l_all_cons member-insert-by select_wf length_wf decidable__le intformnot_wf int_formula_prop_not_lemma decidable__lt l_all_iff cons_member
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation lambdaFormation cut introduction sqequalRule sqequalHypSubstitution lambdaEquality dependent_functionElimination thin hypothesisEquality productElimination independent_pairEquality axiomEquality hypothesis extract_by_obid isectElimination applyEquality functionExtensionality cumulativity independent_functionElimination rename productEquality because_Cache setElimination setEquality functionEquality universeEquality dependent_pairFormation independent_pairFormation isect_memberEquality voidElimination voidEquality baseClosed independent_isectElimination natural_numberEquality int_eqEquality intEquality computeAll inlFormation unionElimination imageElimination inrFormation

Latex:
\mforall{}[T:Type]
    \mforall{}eq,r:T  {}\mrightarrow{}  T  {}\mrightarrow{}  \mBbbB{}.
        Linorder(T;a,b.\muparrow{}(r  a  b))
        {}\mRightarrow{}  (\mforall{}L:T  List.  \mexists{}L':T  List.  (sorted-by(\mlambda{}x,y.  (\muparrow{}(r  x  y));L')  \mwedge{}  no\_repeats(T;L')  \mwedge{}  L  \msubseteq{}  L'  \mwedge{}  L'  \msubseteq{}  L)\000C) 
        supposing  \mforall{}a,b:T.    (\muparrow{}(eq  a  b)  \mLeftarrow{}{}\mRightarrow{}  a  =  b)



Date html generated: 2017_04_17-AM-08_32_54
Last ObjectModification: 2017_02_27-PM-04_53_51

Theory : list_1


Home Index