{ [Info,A1:Type]. [n:]. [X:EClass(A1)].
    (Buffer(n;X)
    = es-interface-accum(L,v.if ||L|| <z n then L @ [v] else tl(L @ [v]) fi ;
                         [];X)) }

{ Proof }



Definitions occuring in Statement :  es-interface-buffer: Buffer(n;X) es-interface-accum: es-interface-accum(f;x;X) eclass: EClass(A[eo; e]) tl: tl(l) length: ||as|| append: as @ bs lt_int: i <z j ifthenelse: if b then t else f fi  nat: uall: [x:A]. B[x] lambda: x.A[x] cons: [car / cdr] nil: [] list: type List universe: Type equal: s = t
Definitions :  assert: b bag: bag(T) pair: <a, b> fpf: a:A fp-B[a] strong-subtype: strong-subtype(A;B) ge: i  j  less_than: a < b uimplies: b supposing a product: x:A  B[x] and: P  Q uiff: uiff(P;Q) implies: P  Q false: False not: A le: A  B int: axiom: Ax tl: tl(l) nil: [] cons: [car / cdr] append: as @ bs length: ||as|| lt_int: i <z j es-interface-accum: es-interface-accum(f;x;X) es-interface-buffer: Buffer(n;X) list: type List subtype: S  T subtype_rel: A r B eq_atom: eq_atom$n(x;y) atom: Atom apply: f a top: Top es-base-E: es-base-E(es) token: "$token" eq_atom: x =a y ifthenelse: if b then t else f fi  record-select: r.x dep-isect: Error :dep-isect,  record+: record+ event_ordering: EO es-E: E event-ordering+: EO+(Info) lambda: x.A[x] isect: x:A. B[x] function: x:A  B[x] all: x:A. B[x] set: {x:A| B[x]}  so_lambda: x y.t[x; y] eclass: EClass(A[eo; e]) uall: [x:A]. B[x] nat: member: t  T equal: s = t universe: Type tactic: Error :tactic,  sq_type: SQType(T) es-loc: loc(e) Id: Id es-interface-predecessors: (X)(e) list_accum: list_accum(x,a.f[x; a];y;l) cond-class: [X?Y] so_apply: x[s] eq_knd: a = b fpf-dom: x  dom(f) es-prior-interface: prior(X) exists: x:A. B[x] es-interface-at: X@i so_lambda: x.t[x] tag-by: zT or: P  Q fset: FSet{T} dataflow: dataflow(A;B) isect2: T1  T2 b-union: A  B fpf-cap: f(x)?z record: record(x.T[x]) is_list_splitting: is_list_splitting(T;L;LL;L2;f) is_accum_splitting: is_accum_splitting(T;A;L;LL;L2;f;g;x) req: x = y rnonneg: rnonneg(r) rleq: x  y i-member: r  I partitions: partitions(I;p) modulus-of-ccontinuity: modulus-of-ccontinuity(omega;I;f) fpf-sub: f  g squash: T sq_stable: SqStable(P) filter: filter(P;l) l_member: (x  l) intensional-universe: IType guard: {T} eclass-val: X(e) es-E-interface: E(X) sqequal: s ~ t true: True rev_implies: P  Q iff: P  Q natural_number: $n void: Void bag_size_empty: bag_size_empty{bag_size_empty_compseq_tag_def:o} bag_size_single: bag_size_single{bag_size_single_compseq_tag_def:o}(x) limited-type: LimitedType prop: bfalse: ff btrue: tt decide: case b of inl(x) =s[x] | inr(y) =t[y] eq_bool: p =b q le_int: i z j eq_int: (i = j) null: null(as) set_blt: a < b grp_blt: a < b infix_ap: x f y dcdr-to-bool: [d] bl-all: (xL.P[x])_b bl-exists: (xL.P[x])_b b-exists: (i<n.P[i])_b eq_type: eq_type(T;T') qeq: qeq(r;s) q_less: q_less(r;s) q_le: q_le(r;s) deq-member: deq-member(eq;x;L) deq-disjoint: deq-disjoint(eq;as;bs) deq-all-disjoint: deq-all-disjoint(eq;ass;bs) eq_id: a = b eq_lnk: a = b es-eq-E: e = e' es-bless: e <loc e' es-ble: e loc e' bimplies: p  q band: p  q bor: p q in-eclass: e  X bnot: b unit: Unit union: left + right bool: sv-class: Singlevalued(X) real: grp_car: |g| Auto: Error :Auto,  CollapseTHENA: Error :CollapseTHENA,  CollapseTHEN: Error :CollapseTHEN,  MaAuto: Error :MaAuto,  Complete: Error :Complete,  CollapseTHENM: Error :CollapseTHENM,  Try: Error :Try,  D: Error :D,  RepeatFor: Error :RepeatFor,  lastn: lastn(n;L) eclass-vals: X(L) map: map(f;as) hd: hd(l)
Lemmas :  map_wf assert_of_lt_int assert_functionality_wrt_uiff bnot_of_lt_int assert_of_le_int le_int_wf lastn-as-accum eclass-vals_wf es-interface-extensionality lt_int_wf length_wf1 sv-class_wf le_wf bool_wf eqtt_to_assert assert_wf not_wf uiff_transitivity eqff_to_assert assert_of_bnot bnot_wf in-eclass_wf member_wf subtype_rel_wf es-interface-top false_wf true_wf top_wf length_wf_nat iff_wf is-interface-accum iff_functionality_wrt_iff iff_weakening_uiff is-interface-buffer rev_implies_wf es-interface-subtype_rel2 eclass-val_wf implies_functionality_wrt_iff intensional-universe_wf list-subtype l_member_wf es-interface-val_wf2 es-E-interface_wf es-interface-val_wf sq_stable__assert interface-buffer-val es-interface-accum-val es-interface-predecessors_wf Id_wf list_accum_wf es-loc_wf nat_properties subtype_base_sq bool_subtype_base assert_elim nat_wf es-E_wf es-base-E_wf subtype_rel_self event-ordering+_inc event-ordering+_wf eclass_wf es-interface-buffer_wf append_wf tl_wf ifthenelse_wf es-interface-accum_wf

\mforall{}[Info,A1:Type].  \mforall{}[n:\mBbbN{}].  \mforall{}[X:EClass(A1)].
    (Buffer(n;X)  =  es-interface-accum(\mlambda{}L,v.if  ||L||  <z  n  then  L  @  [v]  else  tl(L  @  [v])  fi  ;[];X))


Date html generated: 2011_08_16-PM-06_08_14
Last ObjectModification: 2011_06_20-AM-01_48_28

Home Index