{ [Info:Type]. [es:EO+(Info)]. [A:Type]. [f:A  ]. [X:EClass(A)].
  [size:]. [num:A  ]. [P:A  ]. [e:E].
    uiff(e  Collect(size v's from X  with maximum num[v] such that P[v]
                        return <num[v],n,vwith n = maximum f[v]);(e  X)
     e is first@ loc(e) s.t.  c.||filter(c.((num[X(c)] = num[X(e)])
                                              P[X(c)]);(X)(c))||
      = size
     e'<e.(e'  X)
       ((num[X(e')]  num[X(e)])  ((num[X(e')] = num[X(e)])  (P[X(e')])))
     (0 < ||mapfilter(c.X(c);c.(num[X(c)] = num[X(e)]);(X)(e))||)) }

{ Proof }



Definitions occuring in Statement :  es-collect-filter-max: es-collect-filter-max es-interface-predecessors: (X)(e) eclass-val: X(e) in-eclass: e  X eclass: EClass(A[eo; e]) event-ordering+: EO+(Info) es-first-at: e is first@ i s.t.  e.P[e] alle-lt: e<e'.P[e] es-loc: loc(e) es-E: E length: ||as|| eq_int: (i = j) band: p  q assert: b bool: nat_plus: nat: uiff: uiff(P;Q) uall: [x:A]. B[x] so_apply: x[s] le: A  B implies: P  Q and: P  Q less_than: a < b lambda: x.A[x] function: x:A  B[x] natural_number: $n int: universe: Type equal: s = t mapfilter: mapfilter(f;P;L) filter: filter(P;l)
Definitions :  infix_ap: x f y es-causl: (e < e') bfalse: ff unit: Unit int_eq: if a=b  then c  else d btrue: tt atom_eq: atomeqn def sq_type: SQType(T) append: as @ bs locl: locl(a) atom: Atom$n isl: isl(x) can-apply: can-apply(f;x) intensional-universe: IType es-collect-filter-max-aux: es-collect-filter-max-aux(X;size;v.num[v];v.P[v];v.f[v]) es-collect-accum: es-collect-accum(X;x.num[x];init;a,v.f[a; v];a.P[a]) es-interface-accum: es-interface-accum(f;x;X) collect_filter: collect_filter() collect_accum: collect_accum(x.num[x];init;a,v.f[a; v];a.P[a]) Knd: Knd IdLnk: IdLnk proper-iseg: L1 < L2 iseg: l1  l2 l_exists: (xL. P[x]) sqequal: s ~ t list: type List multiply: n * m gt: i > j map: map(f;as) exists: x:A. B[x] cand: A c B cond-class: [X?Y] or: P  Q guard: {T} eq_knd: a = b fpf-dom: x  dom(f) natural_number: $n int_nzero: real: grp_car: |g| limited-type: LimitedType fpf: a:A fp-B[a] l_member: (x  l) es-E-interface: E(X) mapfilter: mapfilter(f;P;L) strong-subtype: strong-subtype(A;B) ge: i  j  es-collect-filter-max: es-collect-filter-max in-eclass: e  X rev_implies: P  Q iff: P  Q so_lambda: x.t[x] es-locl: (e <loc e') es-interface-predecessors: (X)(e) eclass-val: X(e) so_apply: x[s] eq_int: (i = j) band: p  q filter: filter(P;l) length: ||as|| axiom: Ax es-loc: loc(e) Id: Id prop: pair: <a, b> less_than: a < b le: A  B not: A implies: P  Q alle-lt: e<e'.P[e] es-first-at: e is first@ i s.t.  e.P[e] void: Void false: False true: True decide: case b of inl(x) =s[x] | inr(y) =t[y] assert: b uimplies: b supposing a product: x:A  B[x] and: P  Q uiff: uiff(P;Q) bool: set: {x:A| B[x]}  nat: union: left + right nat_plus: subtype: S  T subtype_rel: A r B atom: Atom apply: f a top: Top token: "$token" ifthenelse: if b then t else f fi  record-select: r.x event_ordering: EO es-E: E lambda: x.A[x] so_lambda: x y.t[x; y] eclass: EClass(A[eo; e]) int: dep-isect: Error :dep-isect,  eq_atom: x =a y eq_atom: eq_atom$n(x;y) record+: record+ all: x:A. B[x] function: x:A  B[x] isect: x:A. B[x] uall: [x:A]. B[x] universe: Type member: t  T event-ordering+: EO+(Info) equal: s = t tactic: Error :tactic,  pi2: snd(t) outl: outl(x) pi1: fst(t) map-class: (f[v] where v from X) MaAuto: Error :MaAuto,  CollapseTHEN: Error :CollapseTHEN,  RepeatFor: Error :RepeatFor
Lemmas :  is-collect-filter-max-aux iff_functionality_wrt_iff es-collect-filter-max-aux_wf isl_wf is-map-class assert_wf true_wf in-eclass_wf ifthenelse_wf false_wf es-first-at_wf alle-lt_wf le_wf assert_witness uiff_wf es-locl_wf es-E_wf event-ordering+_inc subtype_rel_self bool_wf nat_wf nat_plus_wf event-ordering+_wf eclass_wf not_wf Id_wf length_wf_nat eclass-val_wf es-interface-predecessors_wf es-E-interface_wf mapfilter_wf pos_length2 es-collect-filter-max_wf member_wf subtype_rel_wf es-interface-top es-loc_wf filter_wf length_wf1 band_wf eq_int_wf rev_implies_wf iff_wf pos-length equal-nil-sq-nil es-interface-subtype_rel2 top_wf intensional-universe_wf list-subtype l_member_wf filter_type iff_weakening_uiff uiff_inversion assert-eq-id subtype_base_sq bool_subtype_base assert_elim nat_plus_properties btrue_wf bfalse_wf unit_wf es-interface-val_wf2

\mforall{}[Info:Type].  \mforall{}[es:EO+(Info)].  \mforall{}[A:Type].  \mforall{}[f:A  {}\mrightarrow{}  \mBbbZ{}].  \mforall{}[X:EClass(A)].  \mforall{}[size:\mBbbN{}\msupplus{}].  \mforall{}[num:A  {}\mrightarrow{}  \mBbbN{}].
\mforall{}[P:A  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[e:E].
    uiff(\muparrow{}e  \mmember{}\msubb{}  Collect(size  v's  from  X    with  maximum  num[v]  such  that  P[v]
                                            return  <num[v],n,v>  with  n  =  maximum  f[v]);(\muparrow{}e  \mmember{}\msubb{}  X)
    \mwedge{}  e  is  first@  loc(e)  s.t.    c.||filter(\mlambda{}c.((num[X(c)]  =\msubz{}  num[X(e)])  \mwedge{}\msubb{}  P[X(c)]);\mleq{}(X)(c))||  =  size
    \mwedge{}  \mforall{}e'<e.(\muparrow{}e'  \mmember{}\msubb{}  X)  {}\mRightarrow{}  ((num[X(e')]  \mleq{}  num[X(e)])  \mwedge{}  ((num[X(e')]  =  num[X(e)])  {}\mRightarrow{}  (\muparrow{}P[X(e')])))
    \mwedge{}  (0  <  ||mapfilter(\mlambda{}c.X(c);\mlambda{}c.(num[X(c)]  =\msubz{}  num[X(e)]);\mleq{}(X)(e))||))


Date html generated: 2011_08_16-PM-05_32_09
Last ObjectModification: 2011_06_20-AM-01_25_20

Home Index