Nuprl Lemma : l_sum-mapfilter

āˆ€[T:Type]. āˆ€[L:T List]. āˆ€[P:T āŸ¶ š”¹]. āˆ€[f:{x:T| (x āˆˆ L) āˆ§ (ā†‘(P x))}  āŸ¶ ā„¤].
  (l_sum(mapfilter(f;P;L)) = Ī£(if L[i] then L[i] else fi  i < ||L||) āˆˆ ā„¤)


Proof




Definitions occuring in Statement :  l_sum: l_sum(L) mapfilter: mapfilter(f;P;L) sum: Ī£(f[x] x < k) l_member: (x āˆˆ l) select: L[n] length: ||as|| list: List assert: ā†‘b ifthenelse: if then else fi  bool: š”¹ uall: āˆ€[x:A]. B[x] and: P āˆ§ Q set: {x:A| B[x]}  apply: a function: x:A āŸ¶ B[x] natural_number: $n int: ā„¤ universe: Type equal: t āˆˆ T
Definitions unfolded in proof :  mapfilter: mapfilter(f;P;L) uall: āˆ€[x:A]. B[x] member: t āˆˆ T all: āˆ€x:A. B[x] nat: ā„• implies: ā‡’ Q false: False ge: i ā‰„  uimplies: supposing a not: Ā¬A satisfiable_int_formula: satisfiable_int_formula(fmla) exists: āˆƒx:A. B[x] top: Top and: P āˆ§ Q prop: ā„™ guard: {T} or: P āˆØ Q select: L[n] nil: [] it: ā‹… so_lambda: Ī»2y.t[x; y] so_apply: x[s1;s2] sum: Ī£(f[x] x < k) sum_aux: sum_aux(k;v;i;x.f[x]) cons: [a b] le: A ā‰¤ B less_than': less_than'(a;b) colength: colength(L) so_lambda: Ī»2x.t[x] so_apply: x[s] sq_type: SQType(T) less_than: a < b squash: ā†“T decidable: Dec(P) subtype_rel: A āŠ†B l_sum: l_sum(L) cand: cāˆ§ B iff: ā‡ā‡’ Q rev_implies: ā‡ Q uiff: uiff(P;Q) int_seg: {i..j-} lelt: i ā‰¤ j < k bool: š”¹ unit: Unit btrue: tt ifthenelse: if then else fi  bfalse: ff bnot: Ā¬bb assert: ā†‘b true: True
Lemmas referenced :  nat_properties full-omega-unsat intformand_wf intformle_wf itermConstant_wf itermVar_wf intformless_wf istype-int int_formula_prop_and_lemma istype-void int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_less_lemma int_formula_prop_wf ge_wf less_than_wf intformeq_wf int_formula_prop_eq_lemma list-cases filter_nil_lemma length_of_nil_lemma stuck-spread istype-base map_nil_lemma product_subtype_list colength-cons-not-zero colength_wf_list istype-false le_wf istype-universe l_member_wf assert_wf bool_wf subtract-1-ge-0 subtype_base_sq set_subtype_base int_subtype_base spread_cons_lemma decidable__equal_int subtract_wf intformnot_wf itermSubtract_wf itermAdd_wf int_formula_prop_not_lemma int_term_value_subtract_lemma int_term_value_add_lemma decidable__le filter_cons_lemma length_of_cons_lemma nat_wf list_wf nil_wf reduce_nil_lemma subtype_rel_dep_function cons_wf subtype_rel_sets cons_member sum_split length_wf add_nat_wf length_wf_nat add-is-int-iff false_wf select_wf int_seg_properties non_neg_length decidable__lt eqtt_to_assert select_member eqff_to_assert bool_cases_sqequal bool_subtype_base assert-bnot int_seg_wf sum1 int_seg_subtype_special int_seg_cases map_cons_lemma reduce_cons_lemma uiff_transitivity equal-wf-T-base bnot_wf not_wf assert_of_bnot sum_wf squash_wf true_wf select-cons-tl add-subtract-cancel satisfiable-full-omega-tt
Rules used in proof :  sqequalSubstitution sqequalRule sqequalReflexivity sqequalTransitivity computationStep Error :isect_memberFormation_alt,  introduction cut thin Error :lambdaFormation_alt,  extract_by_obid sqequalHypSubstitution isectElimination hypothesisEquality hypothesis setElimination rename intWeakElimination natural_numberEquality independent_isectElimination approximateComputation independent_functionElimination Error :dependent_pairFormation_alt,  Error :lambdaEquality_alt,  int_eqEquality dependent_functionElimination Error :isect_memberEquality_alt,  voidElimination independent_pairFormation Error :universeIsType,  axiomEquality equalityTransitivity equalitySymmetry applyLambdaEquality Error :functionIsTypeImplies,  Error :inhabitedIsType,  unionElimination baseClosed promote_hyp hypothesis_subsumption productElimination Error :equalityIsType1,  because_Cache Error :dependent_set_memberEquality_alt,  Error :functionIsType,  Error :setIsType,  Error :productIsType,  applyEquality instantiate imageElimination Error :equalityIsType4,  baseApply closedConclusion intEquality universeEquality functionExtensionality productEquality cumulativity setEquality functionEquality isect_memberFormation voidEquality isect_memberEquality Error :inrFormation_alt,  addEquality pointwiseFunctionality equalityElimination Error :inlFormation_alt,  imageMemberEquality computeAll lambdaEquality dependent_pairFormation

Latex:
\mforall{}[T:Type].  \mforall{}[L:T  List].  \mforall{}[P:T  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[f:\{x:T|  (x  \mmember{}  L)  \mwedge{}  (\muparrow{}(P  x))\}    {}\mrightarrow{}  \mBbbZ{}].
    (l\_sum(mapfilter(f;P;L))  =  \mSigma{}(if  P  L[i]  then  f  L[i]  else  0  fi    |  i  <  ||L||))



Date html generated: 2019_06_20-PM-01_44_12
Last ObjectModification: 2018_10_06-PM-11_55_51

Theory : list_1


Home Index