Qcert.CAMP.Typing.TCAMPSugar


Section TCAMPSugar.





  Context {m:basic_model}.

  Lemma PTCast τc Γ br bs :
    [τc&Γ] |= pcast br ; (Brand bs) ~> (Brand br).

  Lemma PTSingleton τc Γ τ :
    [τc&Γ] |= psingleton ; (Coll τ) ~> τ.

  Lemma PTmapall τc {Γ : tbindings} {τ τ : rtype} {p : pat} :
    NoDup (domain Γ)
    ([τc&Γ] |= p; τ ~> τ) [τc&Γ] |= mapall p; Coll τ ~> Coll τ.


  Lemma PTmapall_inv τc {Γ : tbindings} {τ τ : rtype} {p : pat} :
    RSort.is_list_sorted ODT_lt_dec (domain Γ) = true
    [τc&Γ] |= mapall p; τ ~> τ
                        τ₁' τ₂',
                         τ = Coll τ₁'
                         τ = Coll τ₂'
                         ([τc&Γ] |= p; τ₁' ~> τ₂').

End TCAMPSugar.