Nuprl Lemma : term-accum_wf_wfterm_0

[opr,P:Type]. ∀[sort:term(opr) ⟶ ℕ]. ∀[arity:opr ⟶ ((ℕ × ℕList)]. ∀[R:P ⟶ wfterm(opr;sort;arity) ⟶ ℙ].
[Q:P ⟶ opr ⟶ (varname() List) ⟶ ((t:term(opr) × p:P × R[p;t] supposing ↑wf-term(arity;sort;t)) List) ⟶ P].
[varcase:p:P ⟶ v:{v:varname()| ¬(v nullvar() ∈ varname())}  ⟶ R[p;varterm(v)]].
[mktermcase:p:P
             ⟶ f:opr
             ⟶ bts:wf-bound-terms(opr;sort;arity;f)
             ⟶ L:{L:(t:wfterm(opr;sort;arity) × p:P × R[p;t]) List| 
                   (||L|| ||bts|| ∈ ℤ)
                   ∧ (∀i:ℕ||L||. ((fst(L[i])) (snd(bts[i])) ∈ term(opr)))
                   ∧ (∀i:ℕ||L||. ((fst(snd(L[i]))) Q[p;f;fst(bts[i]);firstn(i;L)] ∈ P))} 
             ⟶ R[p;mkwfterm(f;bts)]]. ∀[t:wfterm(opr;sort;arity)]. ∀[p:P].
  (term-accum(t with p)
   p,f,vs,tr.Q[p;f;vs;tr]
   varterm(x) with  varcase[p;x]
   mkterm(f,bts) with  trs.mktermcase[p;f;bts;trs] ∈ R[p;t])


Proof




Definitions occuring in Statement :  mkwfterm: mkwfterm(f;bts) wf-bound-terms: wf-bound-terms(opr;sort;arity;f) wfterm: wfterm(opr;sort;arity) wf-term: wf-term(arity;sort;t) term-accum: term-accum varterm: varterm(v) term: term(opr) nullvar: nullvar() varname: varname() firstn: firstn(n;as) select: L[n] length: ||as|| list: List int_seg: {i..j-} nat: assert: b uimplies: supposing a uall: [x:A]. B[x] prop: so_apply: x[s1;s2;s3;s4] so_apply: x[s1;s2] pi1: fst(t) pi2: snd(t) all: x:A. B[x] not: ¬A and: P ∧ Q member: t ∈ T set: {x:A| B[x]}  function: x:A ⟶ B[x] product: x:A × B[x] natural_number: $n int: universe: Type equal: t ∈ T
Definitions unfolded in proof :  uall: [x:A]. B[x] member: t ∈ T uimplies: supposing a prop: so_lambda: λ2x.t[x] so_apply: x[s1;s2] wfterm: wfterm(opr;sort;arity) so_apply: x[s] so_apply: x[s1;s2;s3;s4] all: x:A. B[x] assert: b ifthenelse: if then else fi  btrue: tt subtype_rel: A ⊆B wf-term: wf-term(arity;sort;t) varterm: varterm(v) true: True not: ¬A implies:  Q false: False bound-term: bound-term(opr) and: P ∧ Q nat: int_seg: {i..j-} lelt: i ≤ j < k le: A ≤ B decidable: Dec(P) or: P ∨ Q satisfiable_int_formula: satisfiable_int_formula(fmla) exists: x:A. B[x] pi1: fst(t) pi2: snd(t) sq_stable: SqStable(P) squash: T wfbts: wfbts(t) term-bts: term-bts(t) outr: outr(x) mkterm: mkterm(opr;bts) term-opr: term-opr(t) mkwfterm: mkwfterm(f;bts) wf-bound-terms: wf-bound-terms(opr;sort;arity;f) isvarterm: isvarterm(t) isl: isl(x) bfalse: ff cand: c∧ B l_member: (x ∈ l) ge: i ≥  guard: {T} iff: ⇐⇒ Q rev_implies:  Q uiff: uiff(P;Q) rev_uimplies: rev_uimplies(P;Q) respects-equality: respects-equality(S;T)
Lemmas referenced :  term-accum_wf isect_wf assert_wf wf-term_wf istype-assert term_wf wf_term_var_lemma subtype_rel_dep_function varname_wf not_wf equal-wf-T-base varterm_wf nullvar_wf istype-void true_wf mkterm_wf list_wf equal-wf-base length_wf_nat set_subtype_base le_wf istype-int int_subtype_base bound-term_wf all_wf int_seg_wf equal_wf select_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 decidable__lt intformless_wf int_formula_prop_less_lemma intformeq_wf int_formula_prop_eq_lemma firstn_wf sq_stable__subtype_rel uimplies_subtype wfterm_wf subtype_rel_list subtype_rel_self mkwfterm_wf nat_wf istype-nat istype-universe wfbts_wf isvarterm_wf wf-bound-terms_wf subtype_rel_set length_wf subtype_rel_product list-subtype l_member_wf squash_wf nat_properties istype-le istype-less_than iff_weakening_equal pi1_wf assert_functionality_wrt_uiff assert-wf-mkterm respects-equality-set-trivial2
Rules used in proof :  cut introduction extract_by_obid sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation_alt hypothesis sqequalHypSubstitution isectElimination thin hypothesisEquality lambdaEquality_alt sqequalRule applyEquality dependent_set_memberEquality_alt universeIsType dependent_functionElimination Error :memTop,  functionExtensionality setEquality baseClosed lambdaFormation_alt setElimination rename because_Cache natural_numberEquality independent_isectElimination setIsType functionIsType equalityIstype isectEquality isect_memberEquality_alt independent_functionElimination voidElimination inhabitedIsType productEquality intEquality closedConclusion equalityTransitivity equalitySymmetry productElimination unionElimination approximateComputation dependent_pairFormation_alt int_eqEquality independent_pairFormation imageMemberEquality imageElimination productIsType instantiate functionEquality cumulativity universeEquality dependent_pairEquality_alt isectIsType sqequalBase

Latex:
\mforall{}[opr,P:Type].  \mforall{}[sort:term(opr)  {}\mrightarrow{}  \mBbbN{}].  \mforall{}[arity:opr  {}\mrightarrow{}  ((\mBbbN{}  \mtimes{}  \mBbbN{})  List)].  \mforall{}[R:P
                                                                                                                                                      {}\mrightarrow{}  wfterm(opr;sort;arity)
                                                                                                                                                      {}\mrightarrow{}  \mBbbP{}].
\mforall{}[Q:P
        {}\mrightarrow{}  opr
        {}\mrightarrow{}  (varname()  List)
        {}\mrightarrow{}  ((t:term(opr)  \mtimes{}  p:P  \mtimes{}  R[p;t]  supposing  \muparrow{}wf-term(arity;sort;t))  List)
        {}\mrightarrow{}  P].  \mforall{}[varcase:p:P  {}\mrightarrow{}  v:\{v:varname()|  \mneg{}(v  =  nullvar())\}    {}\mrightarrow{}  R[p;varterm(v)]].
\mforall{}[mktermcase:p:P
                          {}\mrightarrow{}  f:opr
                          {}\mrightarrow{}  bts:wf-bound-terms(opr;sort;arity;f)
                          {}\mrightarrow{}  L:\{L:(t:wfterm(opr;sort;arity)  \mtimes{}  p:P  \mtimes{}  R[p;t])  List| 
                                      (||L||  =  ||bts||)
                                      \mwedge{}  (\mforall{}i:\mBbbN{}||L||.  ((fst(L[i]))  =  (snd(bts[i]))))
                                      \mwedge{}  (\mforall{}i:\mBbbN{}||L||.  ((fst(snd(L[i])))  =  Q[p;f;fst(bts[i]);firstn(i;L)]))\} 
                          {}\mrightarrow{}  R[p;mkwfterm(f;bts)]].  \mforall{}[t:wfterm(opr;sort;arity)].  \mforall{}[p:P].
    (term-accum(t  with  p)
      p,f,vs,tr.Q[p;f;vs;tr]
      varterm(x)  with  p  {}\mRightarrow{}  varcase[p;x]
      mkterm(f,bts)  with  p  {}\mRightarrow{}  trs.mktermcase[p;f;bts;trs]  \mmember{}  R[p;t])



Date html generated: 2020_05_19-PM-09_59_02
Last ObjectModification: 2020_03_09-PM-04_10_30

Theory : terms


Home Index