Nuprl Lemma : insert-combine-sorted-by
∀T:Type. ∀cmp:comparison(T).
  ((∀u,x,z:T.  (0 < cmp x u 
⇒ 0 < cmp u z 
⇒ 0 < cmp x z))
  
⇒ (∀f:T ⟶ T ⟶ T
        ((∀u,x:T.  (((cmp x u) = 0 ∈ ℤ) 
⇒ ((cmp u (f x u)) = 0 ∈ ℤ)))
        
⇒ (∀L:T List. ∀x:T.  (sorted-by(λx,y. 0 < cmp x y;L) 
⇒ sorted-by(λx,y. 0 < cmp x y;insert-combine(cmp;f;x;L)))\000C))))
Proof
Definitions occuring in Statement : 
insert-combine: insert-combine(cmp;f;x;l)
, 
comparison: comparison(T)
, 
sorted-by: sorted-by(R;L)
, 
list: T List
, 
less_than: a < b
, 
all: ∀x:A. B[x]
, 
implies: P 
⇒ Q
, 
apply: f a
, 
lambda: λx.A[x]
, 
function: x:A ⟶ B[x]
, 
natural_number: $n
, 
int: ℤ
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
all: ∀x:A. B[x]
, 
implies: P 
⇒ Q
, 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
so_lambda: λ2x.t[x]
, 
prop: ℙ
, 
comparison: comparison(T)
, 
so_apply: x[s]
, 
insert-combine: insert-combine(cmp;f;x;l)
, 
sorted-by: sorted-by(R;L)
, 
select: L[n]
, 
uimplies: b supposing a
, 
nil: []
, 
it: ⋅
, 
so_lambda: λ2x y.t[x; y]
, 
top: Top
, 
so_apply: x[s1;s2]
, 
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
, 
and: P ∧ Q
, 
satisfiable_int_formula: satisfiable_int_formula(fmla)
, 
exists: ∃x:A. B[x]
, 
false: False
, 
not: ¬A
, 
has-value: (a)↓
, 
bool: 𝔹
, 
unit: Unit
, 
btrue: tt
, 
uiff: uiff(P;Q)
, 
ifthenelse: if b then t else f fi 
, 
iff: P 
⇐⇒ Q
, 
rev_implies: P 
⇐ Q
, 
cand: A c∧ B
, 
bfalse: ff
, 
or: P ∨ Q
, 
sq_type: SQType(T)
, 
bnot: ¬bb
, 
assert: ↑b
, 
l_all: (∀x∈L.P[x])
, 
squash: ↓T
, 
true: True
, 
subtype_rel: A ⊆r B
, 
decidable: Dec(P)
, 
less_than: a < b
, 
nequal: a ≠ b ∈ T 
, 
l_exists: (∃x∈L. P[x])
Lemmas referenced : 
list_induction, 
all_wf, 
sorted-by_wf, 
l_member_wf, 
less_than_wf, 
insert-combine_wf, 
list_wf, 
equal-wf-T-base, 
comparison_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, 
int_seg_wf, 
list_ind_cons_lemma, 
value-type-has-value, 
int-value-type, 
eq_int_wf, 
bool_wf, 
eqtt_to_assert, 
assert_of_eq_int, 
sorted-by-cons, 
eqff_to_assert, 
equal_wf, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
neg_assert_of_eq_int, 
lt_int_wf, 
assert_of_lt_int, 
cons_wf, 
squash_wf, 
true_wf, 
iff_weakening_equal, 
select_wf, 
length_wf, 
decidable__le, 
intformnot_wf, 
int_formula_prop_not_lemma, 
decidable__lt, 
intformeq_wf, 
int_formula_prop_eq_lemma, 
l_all_cons, 
minus-is-int-iff, 
itermMinus_wf, 
int_term_value_minus_lemma, 
false_wf, 
l_all_iff, 
member-insert-combine, 
and_wf, 
select_member, 
minus_functionality_wrt_eq
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
lambdaFormation, 
cut, 
thin, 
introduction, 
extract_by_obid, 
sqequalHypSubstitution, 
isectElimination, 
hypothesisEquality, 
sqequalRule, 
lambdaEquality, 
cumulativity, 
functionEquality, 
because_Cache, 
hypothesis, 
setElimination, 
rename, 
natural_numberEquality, 
applyEquality, 
setEquality, 
dependent_functionElimination, 
functionExtensionality, 
independent_functionElimination, 
intEquality, 
baseClosed, 
universeEquality, 
independent_isectElimination, 
isect_memberEquality, 
voidElimination, 
voidEquality, 
productElimination, 
dependent_pairFormation, 
int_eqEquality, 
independent_pairFormation, 
computeAll, 
callbyvalueReduce, 
unionElimination, 
equalityElimination, 
equalityTransitivity, 
equalitySymmetry, 
promote_hyp, 
instantiate, 
imageElimination, 
imageMemberEquality, 
pointwiseFunctionality, 
baseApply, 
closedConclusion, 
hyp_replacement, 
dependent_set_memberEquality, 
applyLambdaEquality
Latex:
\mforall{}T:Type.  \mforall{}cmp:comparison(T).
    ((\mforall{}u,x,z:T.    (0  <  cmp  x  u  {}\mRightarrow{}  0  <  cmp  u  z  {}\mRightarrow{}  0  <  cmp  x  z))
    {}\mRightarrow{}  (\mforall{}f:T  {}\mrightarrow{}  T  {}\mrightarrow{}  T
                ((\mforall{}u,x:T.    (((cmp  x  u)  =  0)  {}\mRightarrow{}  ((cmp  u  (f  x  u))  =  0)))
                {}\mRightarrow{}  (\mforall{}L:T  List.  \mforall{}x:T.
                            (sorted-by(\mlambda{}x,y.  0  <  cmp  x  y;L)  {}\mRightarrow{}  sorted-by(\mlambda{}x,y.  0  <  cmp  x  y;insert-combine(cmp;f;x;\000CL)))))))
Date html generated:
2017_04_17-AM-08_29_48
Last ObjectModification:
2017_02_27-PM-04_52_53
Theory : list_1
Home
Index