Nuprl Lemma : coerce-fetch'-commutes
∀[Val,S:Type]. ∀[n:ℕ]. ∀[AType:array{i:l}(Val;n)]. ∀[prog:Val ⟶ Val ⟶ (A-map S)].
  ∀j,k:ℕn.
    ((A-bind(array-model(AType)) (A-coerce(array-model(AType)) (A-fetch'(array-model(AType)) k)) 
      (λval@k.(A-bind(array-model(AType)) (A-coerce(array-model(AType)) (A-fetch'(array-model(AType)) j)) 
               (λval@j.(prog val@k val@j)))))
    = (A-bind(array-model(AType)) (A-coerce(array-model(AType)) (A-fetch'(array-model(AType)) j)) 
       (λval@j.(A-bind(array-model(AType)) (A-coerce(array-model(AType)) (A-fetch'(array-model(AType)) k)) 
                (λval@k.(prog val@k val@j)))))
    ∈ (A-map S))
Proof
Definitions occuring in Statement : 
A-coerce: A-coerce(AModel)
, 
A-fetch': A-fetch'(AModel)
, 
A-bind: A-bind(AModel)
, 
A-map: A-map
, 
array-model: array-model(AType)
, 
array: array{i:l}(Val;n)
, 
int_seg: {i..j-}
, 
nat: ℕ
, 
uall: ∀[x:A]. B[x]
, 
all: ∀x:A. B[x]
, 
apply: f a
, 
lambda: λx.A[x]
, 
function: x:A ⟶ B[x]
, 
natural_number: $n
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
all: ∀x:A. B[x]
, 
array: array{i:l}(Val;n)
, 
array-model: array-model(AType)
, 
A-fetch': A-fetch'(AModel)
, 
A-coerce: A-coerce(AModel)
, 
A-bind: A-bind(AModel)
, 
A-map: A-map
, 
pi2: snd(t)
, 
pi1: fst(t)
, 
idx: idx(AType)
, 
array-monad: array-monad(AType)
, 
M-bind: M-bind(Mnd)
, 
M-map: M-map(mnd)
, 
let: let, 
Arr: Arr(AType)
, 
mk_monad: mk_monad(M;return;bind)
, 
nat: ℕ
, 
top: Top
Lemmas referenced : 
int_seg_wf, 
istype-universe, 
A-map_wf, 
array_wf, 
nat_wf, 
istype-void, 
top_wf
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation_alt, 
introduction, 
cut, 
lambdaFormation_alt, 
sqequalHypSubstitution, 
productElimination, 
thin, 
sqequalRule, 
hypothesis, 
inhabitedIsType, 
hypothesisEquality, 
universeIsType, 
extract_by_obid, 
isectElimination, 
natural_numberEquality, 
setElimination, 
rename, 
lambdaEquality_alt, 
dependent_functionElimination, 
axiomEquality, 
functionIsTypeImplies, 
functionIsType, 
applyEquality, 
isect_memberEquality_alt, 
because_Cache, 
universeEquality, 
functionExtensionality, 
voidElimination, 
functionExtensionality_alt
Latex:
\mforall{}[Val,S:Type].  \mforall{}[n:\mBbbN{}].  \mforall{}[AType:array\{i:l\}(Val;n)].  \mforall{}[prog:Val  {}\mrightarrow{}  Val  {}\mrightarrow{}  (A-map  S)].
    \mforall{}j,k:\mBbbN{}n.
        ((A-bind(array-model(AType))  (A-coerce(array-model(AType))  (A-fetch'(array-model(AType))  k)) 
            (\mlambda{}val@k.(A-bind(array-model(AType)) 
                              (A-coerce(array-model(AType))  (A-fetch'(array-model(AType))  j)) 
                              (\mlambda{}val@j.(prog  val@k  val@j)))))
        =  (A-bind(array-model(AType))  (A-coerce(array-model(AType))  (A-fetch'(array-model(AType))  j)) 
              (\mlambda{}val@j.(A-bind(array-model(AType)) 
                                (A-coerce(array-model(AType))  (A-fetch'(array-model(AType))  k)) 
                                (\mlambda{}val@k.(prog  val@k  val@j))))))
Date html generated:
2019_10_15-AM-10_59_31
Last ObjectModification:
2018_10_11-PM-09_54_09
Theory : monads
Home
Index