Nuprl Lemma : l_before_swap
∀[T:Type]
  ∀L:T List. ∀i:ℕ||L|| - 1. ∀a,b:T.
    (a before b ∈ swap(L;i;i + 1) ⇒ (a before b ∈ L ∨ ((a = L[i + 1] ∈ T) ∧ (b = L[i] ∈ T))))
Proof
Definitions occuring in Statement : 
swap: swap(L;i;j), 
l_before: x before y ∈ l, 
select: L[n], 
length: ||as||, 
list: T List, 
int_seg: {i..j-}, 
uall: ∀[x:A]. B[x], 
all: ∀x:A. B[x], 
implies: P ⇒ Q, 
or: P ∨ Q, 
and: P ∧ Q, 
subtract: n - m, 
add: n + m, 
natural_number: $n, 
universe: Type, 
equal: s = t ∈ T
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x], 
all: ∀x:A. B[x], 
implies: P ⇒ Q, 
l_before: x before y ∈ l, 
sublist: L1 ⊆ L2, 
exists: ∃x:A. B[x], 
and: P ∧ Q, 
member: t ∈ T, 
top: Top, 
int_seg: {i..j-}, 
lelt: i ≤ j < k, 
prop: ℙ, 
uiff: uiff(P;Q), 
uimplies: b supposing a, 
squash: ↓T, 
so_lambda: λ2x.t[x], 
guard: {T}, 
decidable: Dec(P), 
or: P ∨ Q, 
not: ¬A, 
satisfiable_int_formula: satisfiable_int_formula(fmla), 
false: False, 
ge: i ≥ j , 
subtype_rel: A ⊆r B, 
le: A ≤ B, 
less_than': less_than'(a;b), 
true: True, 
so_apply: x[s], 
iff: P ⇐⇒ Q, 
less_than: a < b, 
select: L[n], 
cons: [a / b], 
subtract: n - m, 
flip: (i, j), 
nat: ℕ, 
bool: 𝔹, 
unit: Unit, 
it: ⋅, 
btrue: tt, 
ifthenelse: if b then t else f fi , 
bfalse: ff, 
sq_type: SQType(T), 
bnot: ¬bb, 
assert: ↑b, 
cand: A c∧ B, 
nequal: a ≠ b ∈ T 
Lemmas referenced : 
length_of_cons_lemma, 
length_of_nil_lemma, 
swap_length, 
lelt_wf, 
length_wf, 
add-member-int_seg2, 
subtract_wf, 
all_wf, 
squash_wf, 
true_wf, 
int_seg_wf, 
equal_wf, 
select_wf, 
cons_wf, 
nil_wf, 
int_seg_properties, 
decidable__le, 
full-omega-unsat, 
intformand_wf, 
intformnot_wf, 
intformle_wf, 
itermConstant_wf, 
itermVar_wf, 
int_formula_prop_and_lemma, 
int_formula_prop_not_lemma, 
int_formula_prop_le_lemma, 
int_term_value_constant_lemma, 
int_term_value_var_lemma, 
int_formula_prop_wf, 
non_neg_length, 
swap_wf, 
add-member-int_seg1, 
decidable__lt, 
intformless_wf, 
itermAdd_wf, 
int_formula_prop_less_lemma, 
int_term_value_add_lemma, 
swap_select, 
int_seg_subtype, 
false_wf, 
le_weakening, 
subtype_rel_self, 
iff_weakening_equal, 
flip_wf, 
length_wf_nat, 
or_wf, 
sublist_wf, 
itermSubtract_wf, 
int_term_value_subtract_lemma, 
l_before_wf, 
subtract-is-int-iff, 
list_wf, 
sublist_pair, 
increasing_implies, 
le_wf, 
eq_int_wf, 
bool_wf, 
eqtt_to_assert, 
assert_of_eq_int, 
intformeq_wf, 
int_formula_prop_eq_lemma, 
eqff_to_assert, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
neg_assert_of_eq_int, 
not_wf, 
less_than_wf
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation, 
lambdaFormation, 
sqequalHypSubstitution, 
productElimination, 
thin, 
sqequalRule, 
cut, 
introduction, 
extract_by_obid, 
dependent_functionElimination, 
isect_memberEquality, 
voidElimination, 
voidEquality, 
hypothesis, 
isectElimination, 
because_Cache, 
hypothesisEquality, 
setElimination, 
rename, 
dependent_set_memberEquality, 
independent_pairFormation, 
natural_numberEquality, 
cumulativity, 
independent_isectElimination, 
applyEquality, 
lambdaEquality, 
imageElimination, 
equalityTransitivity, 
equalitySymmetry, 
functionEquality, 
universeEquality, 
unionElimination, 
approximateComputation, 
independent_functionElimination, 
dependent_pairFormation, 
int_eqEquality, 
intEquality, 
addEquality, 
imageMemberEquality, 
baseClosed, 
instantiate, 
functionExtensionality, 
hyp_replacement, 
applyLambdaEquality, 
productEquality, 
pointwiseFunctionality, 
promote_hyp, 
baseApply, 
closedConclusion, 
inlFormation, 
inrFormation, 
equalityElimination, 
independent_pairEquality, 
axiomEquality
Latex:
\mforall{}[T:Type]
    \mforall{}L:T  List.  \mforall{}i:\mBbbN{}||L||  -  1.  \mforall{}a,b:T.
        (a  before  b  \mmember{}  swap(L;i;i  +  1)  {}\mRightarrow{}  (a  before  b  \mmember{}  L  \mvee{}  ((a  =  L[i  +  1])  \mwedge{}  (b  =  L[i]))))
Date html generated:
2018_05_21-PM-06_21_15
Last ObjectModification:
2018_05_19-PM-05_35_18
Theory : list!
Home
Index