Nuprl Lemma : firstn-append

[L1,L2:Top List]. ∀[n:ℕ].  (firstn(n;L1 L2) if n ≤||L1|| then firstn(n;L1) else L1 firstn(n ||L1||;L2) fi )


Proof




Definitions occuring in Statement :  firstn: firstn(n;as) length: ||as|| append: as bs list: List nat: le_int: i ≤j ifthenelse: if then else fi  uall: [x:A]. B[x] top: Top subtract: m sqequal: t
Definitions unfolded in proof :  uall: [x:A]. B[x] member: t ∈ T all: x:A. B[x] nat: implies:  Q false: False and: P ∧ Q ge: i ≥  le: A ≤ B cand: c∧ B less_than: a < b squash: T guard: {T} uimplies: supposing a prop: or: P ∨ Q firstn: firstn(n;as) append: as bs so_lambda: so_lambda3 so_apply: x[s1;s2;s3] cons: [a b] less_than': less_than'(a;b) not: ¬A colength: colength(L) nil: [] it: so_lambda: λ2x.t[x] so_apply: x[s] sq_type: SQType(T) so_lambda: λ2y.t[x; y] so_apply: x[s1;s2] sq_stable: SqStable(P) decidable: Dec(P) iff: ⇐⇒ Q rev_implies:  Q uiff: uiff(P;Q) subtract: m true: True subtype_rel: A ⊆B bool: 𝔹 unit: Unit btrue: tt ifthenelse: if then else fi  bfalse: ff exists: x:A. B[x] bnot: ¬bb assert: b nat_plus: +
Lemmas referenced :  nat_properties less_than_transitivity1 less_than_irreflexivity ge_wf istype-less_than top_wf list-cases list_ind_nil_lemma length_of_nil_lemma product_subtype_list colength-cons-not-zero istype-nat colength_wf_list istype-void istype-le list_wf subtract-1-ge-0 subtype_base_sq nat_wf set_subtype_base le_wf int_subtype_base spread_cons_lemma sq_stable__le decidable__equal_int subtract_wf istype-false not-equal-2 condition-implies-le add-associates minus-add minus-one-mul add-swap minus-one-mul-top le_antisymmetry_iff add_functionality_wrt_le add-commutes zero-add le-add-cancel minus-minus list_ind_cons_lemma length_of_cons_lemma le_weakening2 le_int_wf equal-wf-base bool_wf istype-int assert_wf lt_int_wf less_than_wf bnot_wf eqtt_to_assert assert_of_le_int eqff_to_assert bool_cases_sqequal bool_subtype_base assert-bnot iff_weakening_uiff assert_of_lt_int minus-zero not-lt-2 add-zero less-iff-le uiff_transitivity assert_functionality_wrt_uiff bnot_of_le_int bnot_of_lt_int length_wf equal-wf-T-base add-is-int-iff length_wf_nat decidable__le not-le-2 non_neg_length istype-sqequal le_reflexive one-mul add-mul-special two-mul mul-distributes-right zero-mul omega-shadow mul-distributes mul-commutes mul-associates
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation_alt introduction cut thin lambdaFormation_alt extract_by_obid sqequalHypSubstitution isectElimination hypothesisEquality hypothesis setElimination rename intWeakElimination independent_pairFormation productElimination imageElimination natural_numberEquality independent_isectElimination independent_functionElimination voidElimination universeIsType sqequalRule lambdaEquality_alt dependent_functionElimination isect_memberEquality_alt axiomSqEquality isectIsTypeImplies inhabitedIsType functionIsTypeImplies unionElimination Error :memTop,  promote_hyp hypothesis_subsumption equalityIstype dependent_set_memberEquality_alt because_Cache instantiate cumulativity intEquality equalityTransitivity equalitySymmetry imageMemberEquality baseClosed applyLambdaEquality addEquality minusEquality baseApply closedConclusion applyEquality sqequalBase equalityElimination dependent_pairFormation_alt multiplyEquality

Latex:
\mforall{}[L1,L2:Top  List].  \mforall{}[n:\mBbbN{}].
    (firstn(n;L1  @  L2)  \msim{}  if  n  \mleq{}z  ||L1||  then  firstn(n;L1)  else  L1  @  firstn(n  -  ||L1||;L2)  fi  )



Date html generated: 2020_05_19-PM-09_37_57
Last ObjectModification: 2020_03_09-PM-01_32_32

Theory : list_0


Home Index