Theoremadm_mono
The property of sec:static-core-types, first part: κ ≤ κ' gives Adm κ ⊆ Adm κ'.
Statement
theorem adm_mono {k k' : Cls} {τ : Ty} (hle : k.le k' = true) (h : Adm k τ) : Adm k' τProof
by
cases k' with
| any => exact .any τ
| num => cases k <;> simp [Cls.le] at hle; exact h
| comp =>
cases k with
| any => simp [Cls.le] at hle
| app => simp [Cls.le] at hle
| comp => exact h
| num =>
cases h with
| num_int => exact .comp_int
| num_float => exact .comp_float
| num_var a ha => exact .comp_var a (by simp [ha, Cls.le])
| capp =>
cases h with
| capp_string => exact .comp_string
| capp_list τ h => exact .comp_list τ h
| capp_var a ha => exact .comp_var a (by simp [ha, Cls.le])
| app =>
cases k with
| any | num | comp => simp [Cls.le] at hle
| app => exact h
| capp =>
cases h with
| capp_string => exact .app_string
| capp_list τ _ => exact .app_list τ
| capp_var a ha => exact .app_var a (by simp [ha, Cls.le])
| capp => cases k <;> simp [Cls.le] at hle; exact hProved with tactics, which Lean expands into a proof term that its kernel checks.
In StandardElmMech/Stat/Subst.lean: Substitutions, the classes and their meets, admissible types (Adm, adm_iff, adm_mono).
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.