diff options
author | Josh Chen | 2020-07-31 14:56:24 +0200 |
---|---|---|
committer | Josh Chen | 2020-07-31 14:56:24 +0200 |
commit | ff5454812f9e2720bd90c3a5437505644f63b487 (patch) | |
tree | 2df5f45de006c56391118db75e2f185036b02cd7 /spartan/lib/Maybe.thy | |
parent | 2b0e14b16dcef0e829da95800b3c0af1975bb1ce (diff) |
(FEAT) Term elaboration of assumption and goal statements.
. spartan/core/goals.ML
. spartan/core/elaboration.ML
. spartan/core/elaborated_statement.ML
(FEAT) More context tacticals and search tacticals.
. spartan/core/context_tactical.ML
(FEAT) Improved subgoal focus.
Moves fully elaborated assumptions into the context (MINOR INCOMPATIBILITY).
. spartan/core/focus.ML
(FIX) Normalize facts in order to be able to resolve properly.
. spartan/core/typechecking.ML
(MAIN) New definitions.
(MAIN) Renamed theories and theorems.
(MAIN) Refactor theories to fit new features.
Diffstat (limited to '')
-rw-r--r-- | spartan/lib/Maybe.thy | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/spartan/lib/Maybe.thy b/spartan/lib/Maybe.thy index 0ce534c..a2e1638 100644 --- a/spartan/lib/Maybe.thy +++ b/spartan/lib/Maybe.thy @@ -1,7 +1,7 @@ chapter \<open>Maybe type\<close> theory Maybe -imports More_Types +imports Prelude begin @@ -25,11 +25,10 @@ Definition MaybeInd: "\<And>a. a: A \<Longrightarrow> f a: C (some A a)" "m: Maybe A" shows "C m" - supply assms[unfolded Maybe_def none_def some_def] + using assms[unfolded Maybe_def none_def some_def] apply (elim m) - \<guillemotright> unfolding Maybe_def . - \<guillemotright> by (rule \<open>_ \<Longrightarrow> _: C (inl _ _ _)\<close>) - \<guillemotright> by elim (rule \<open>_: C (inr _ _ _)\<close>) + apply (rule \<open>_ \<Longrightarrow> _: C (inl _ _ _)\<close>) + apply (elim, rule \<open>_: C (inr _ _ _)\<close>) done Lemma Maybe_comp_none: @@ -39,8 +38,9 @@ Lemma Maybe_comp_none: "\<And>a. a: A \<Longrightarrow> f a: C (some A a)" "\<And>m. m: Maybe A \<Longrightarrow> C m: U i" shows "MaybeInd A C c\<^sub>0 f (none A) \<equiv> c\<^sub>0" - supply assms[unfolded Maybe_def some_def none_def] - unfolding MaybeInd_def none_def by reduce + using assms + unfolding Maybe_def MaybeInd_def none_def some_def + by reduce Lemma Maybe_comp_some: assumes @@ -50,8 +50,9 @@ Lemma Maybe_comp_some: "\<And>a. a: A \<Longrightarrow> f a: C (some A a)" "\<And>m. m: Maybe A \<Longrightarrow> C m: U i" shows "MaybeInd A C c\<^sub>0 f (some A a) \<equiv> f a" - supply assms[unfolded Maybe_def some_def none_def] - unfolding MaybeInd_def some_def by (reduce add: Maybe_def) + using assms + unfolding Maybe_def MaybeInd_def none_def some_def + by reduce lemmas [form] = MaybeF and |