Nuprl Lemma : insert-by-sorted-by

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


Proof




Definitions occuring in Statement :  insert-by: insert-by(eq;r;x;l) sorted-by: sorted-by(R;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] iff: ⇐⇒ Q implies:  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] insert-by: insert-by(eq;r;x;l) sorted-by: sorted-by(R;L) select: L[n] nil: [] it: top: Top so_lambda: so_lambda(x,y,z.t[x; y; z]) so_apply: x[s1;s2;s3] guard: {T} int_seg: {i..j-} lelt: i ≤ j < k satisfiable_int_formula: satisfiable_int_formula(fmla) exists: x:A. B[x] false: False not: ¬A cand: c∧ B bool: 𝔹 unit: Unit btrue: tt uiff: uiff(P;Q) ifthenelse: if then else fi  bfalse: ff assert: b l_all: (∀x∈L.P[x]) decidable: Dec(P) or: P ∨ Q less_than: a < b squash: T linorder: Linorder(T;x,y.R[x; y]) order: Order(T;x,y.R[x; y]) trans: Trans(T;x,y.E[x; y]) connex: Connex(T;x,y.R[x; y])
Lemmas referenced :  assert_wf assert_witness equal_wf list_induction sorted-by_wf l_member_wf insert-by_wf list_wf linorder_wf all_wf iff_wf bool_wf length_of_nil_lemma stuck-spread base_wf list_ind_nil_lemma length_of_cons_lemma 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 select_wf cons_wf nil_wf int_seg_wf list_ind_cons_lemma equal-wf-T-base bnot_wf not_wf sorted-by-cons eqtt_to_assert uiff_transitivity eqff_to_assert assert_of_bnot l_all_cons length_wf decidable__le intformnot_wf int_formula_prop_not_lemma decidable__lt l_all_iff member-insert-by
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 because_Cache functionEquality setElimination setEquality universeEquality baseClosed independent_isectElimination isect_memberEquality voidElimination voidEquality natural_numberEquality dependent_pairFormation int_eqEquality intEquality independent_pairFormation computeAll equalityTransitivity equalitySymmetry unionElimination equalityElimination imageElimination hyp_replacement applyLambdaEquality

Latex:
\mforall{}[T:Type]
    \mforall{}eq,r:T  {}\mrightarrow{}  T  {}\mrightarrow{}  \mBbbB{}.
        Linorder(T;a,b.\muparrow{}(r  a  b))
        {}\mRightarrow{}  (\mforall{}x:T.  \mforall{}L:T  List.
                    (sorted-by(\mlambda{}x,y.  (\muparrow{}(r  x  y));L)  {}\mRightarrow{}  sorted-by(\mlambda{}x,y.  (\muparrow{}(r  x  y));insert-by(eq;r;x;L)))) 
        supposing  \mforall{}a,b:T.    (\muparrow{}(eq  a  b)  \mLeftarrow{}{}\mRightarrow{}  a  =  b)



Date html generated: 2017_04_17-AM-08_32_00
Last ObjectModification: 2017_02_27-PM-04_52_30

Theory : list_1


Home Index